Case 1:
if(title == ""){} //Wrong
if($title == ""){} //Right
Case 2:
$department = mysql_real_escape_string($_POST[department]); //WrongCase 3:
$department = mysql_real_escape_string($_POST['department']); //Right
$field_name = ‘department’;
$department = mysql_real_escape_string($_POST[$field_name]); //Right
Reference:
http://php.net/manual/en/language.constants.php
http://stackoverflow.com/questions/2941169/what-does-the-php-error-message-notice-use-of-undefined-constant-mean
No comments :
Post a Comment