I can't seem to get this to work. When viewing, these get omitted even though there are entries in the database for these fields.
Any ideas?
$query = "SELECT benefits FROM jobs where id = '$file'";
$result = mysql_query($query);
if ( $benefits == "" ) {
echo "";
} else {
echo "<p><strong>Job Benefits:</strong><br />";
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$benefits = nl2br(stripslashes($row['benefits']));
echo "$benefits</p>";
}
}
$query = "SELECT pay FROM jobs where id = '$file'";
$result = mysql_query($query);
if ( $pay == "" ) {
echo "";
} else {
echo "<p><strong>Job Compensation:</strong> ";
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$pay = $row['pay'];
echo "$pay</p>";
}
}