I am having problems with the following piece of code :-
//select records from database
$dbquery="SELECT * FROM table WHERE Name='$inputname'";
$dbrecords=@($dbquery);
if (!$dbrecords) {
echo("no records");
exit();
} else {
echo("records available");
}
I want to basically query the table and look for Name=$inputname. If it is in the table then carry on with the process otherwise let the user know that there are "no records".
Can anyone see where I am going wrong?
Cheers
Phil