Hi guys. First I have spent awhiel trying to find an answer for this online and haven't been able to. I have defined a variable ($new) in the beginning of my page. to test that is IS defined right i echo'd it...im using nested if statements to check thing. in the second if statement for some reason the variable is redefined to 'yes'. why is this? all the code isnt doine..im testing as i go useing text just to see that things are being evaluiated right..here is the code...
$query1="SELECT * FROM $clean_title WHERE lname='$last_name' AND fname='$first_name' AND first='yes'";
$result1=mysql_query($query1) or die(mysql_error());
if (mysql_num_rows($result1) > 0)
{
if ($new="yes")
{
echo'
This character has already been entered as new
';
}
else
{
echo'
Character can be entered into database
';
}
}
else
{
echo'
Character can be entered into database
';
}
mysql_close();
Pleas help. I know I just must be doing something wrong someweher but I can't see it.