Apologies for the vague title but I have no idea what else to call this.
I have an mysqli_query which will not bring me any data.
I have checked the code against previous queries which I have ran that have worked and can't spot any difference as well as checking the DB for and spelling mistakes/discrepancies.
<?php
$company = $_POST['company'];
$job = $_POST['job'];
$resort = $_POST['resort'];
$companyrev = $_POST['companyrev'];
$jobrev = $_POST['jobrev'];
$resortrev = $_POST['resortrev'];
$salary = $_POST['salary'];
$time = $_POST['time'];
$bonus = $_POST['bonus'];
$progression = $_POST['progression'];
$perks = $_POST['perks'];
$skiing = $_POST['skiing'];
$snowboarding = $_POST['snowboarding'];
$offpiste = $_POST['offpiste'];
$nonskiing = $_POST['nonskiing'];
$apres = $_POST['apres'];
$nightlife = $_POST['nightlife'];
$costs = $_POST['costs'];
$longevity = $_POST['longevity'];
$con=mysqli_connect("localhost",".",".",".");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$query = mysqli_query($con,"SELECT * FROM Companies WHERE Company = $company");
$row = mysqli_fetch_array($query,MYSQLI_ASSOC);
$salaryavg = $row['Salary'];
$timeavg = $row['Time'];
$bonusavg = $row['Bonus'];
$progressionavg = $row['Progression'];
$perksavg = $row['Perksavg'];
$factor = $row['Factor'];
$id = $row['id'];
Any help would be much appreciated!