the first echo
echo $strSQL;
gives:
SELECT company_name from passwds where user = "jgonzalez" and ID = "0052"
wich is allright
but the second pair of echos are supposed to return solution if company_name is solutions and selex if company name is selex
but i always get for an echo selex, even if in the database its solutions
what am i doing wrong?
<?php
if ($submit)
{
$dbcnx = mysql_connect("localhost", "mydabase", "mypassword");
mysql_select_db("selex", $dbcnx);
$strSQL = 'SELECT company_name from passwds where user = "' . $_POST['user'] . '" and ID = "' . $_POST['pass'] . '"' or die(mysql_error());
$res = mysql_query($strSQL);
echo $strSQL;
$x = @mysql_num_rows($res);
if($row[company_name] = 'selex')
{
echo 'selex';
//$image = 'selex.jpg';
} else {
//$image = 'selex.jpg';
echo 'solutions';
}