i would like to ask for someone's help with my code. This is when after submitting the input the computer to check first if the Id number($PIC) not found in the database it should display "not valid ID number!".
if($submit){
if ($PIC){
$query = "SELECT * FROM staffs WHERE PIC="$PIC";
$result = mysql_query($query) or die('error making query');
$affected_rows = mysql_num_rows($result);
if($affected_rows == 0) {
print 'not valid ID number!';
}
I got this error message
Parse error: parse error, unexpected T_VARIABLE in /var/www/html/rhodora/testing/borrowing_form.php on line 13
wherein line 13 is:$query = "SELECT * FROM staffs WHERE PIC="$PIC";
I really need help.
Thanks!