I am a beginner when it comes to php.... I have the following:
I am not sure if it is my if statement expressed wrong or just at the wrong place. I want it not to show the records when the companyname == the businessname! Please advise?
if (mysql_num_rows($sql) > 0 && **($row['companyname'] == $user_data['businessname'])** )
{
while ($row = mysql_fetch_array($sql)){
if (($employed =='1')){
echo '<h4> ID : '.$row['idnumber'] ;
echo '<br> First Name : '.$row['firstname'];
echo '<br> Last Name : '.$row['lastname'];
echo '<br> Reference 1 : '.$row['ref1'];
echo '<br> Reference 2 : '.$row['ref2'];
echo '<br> Reference 3 : '.$row['ref3'];
echo '<br> Gender : '.$row['gender'];
echo '<br> Company : '.$row['companyname'];
echo ' </h4>';
echo '<br />';
echo '<h2>Some Additional Options</h2>';
echo '<br />';
include 'includes/admenu.php';
}
}
}
else
{
print ("$XX");
}