Hi,
> My problem is working out how to evaluate this new part. I have normal
> If
> statements for the listing, adding, etc. But how can I get it to check
> if
> clientcode is present. If clientcode is not present I want it to load
> the
> list page as normal. But if the clientcode is present then it is to
> load
> something else.
>
> How do I structure my IF statement?
If i understand correctly, you need something like this...
$sql = "select clientcode from table where clientcode='$var'";
$qu = mysql_query($sql) or die(mysql_error());
if(mysql_num_rows($qu)=='0') {
//does not exist
} else {
//exists
//loop through records here.
}
hmmz might be wrong... just came back from a few weeks of holidays.
Regards,
James Mclean
Adam Internet Web Design Team
� [EMAIL PROTECTED] | www.adam.com.au �
� 199 Sturt St. | P: 8231 0303 �
� Adelaide 5000 | F: 8231 0223 �
"Windows didn't get as bad as it is overnight -- it took over ten years of
careful development."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]