My code is as follows:Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/.sites/78/site85/web/register.php on line 20
Code: Select all
if ($HTTP_GET_VARSї'action'] == 1) {
//Define 'FORM POSTED' contents
define('INPUT_VAR_1', $HTTP_POST_VARSї'fullname']);
define('INPUT_VAR_2', $HTTP_POST_VARSї'email']);
define('INPUT_VAR_3', $HTTP_POST_VARSї'birth']);
define('INPUT_VAR_4', $HTTP_POST_VARSї'location']);
define('INPUT_VAR_5', $HTTP_POST_VARSї'city']);
define('INPUT_VAR_6', $HTTP_POST_VARSї'phone']);
define('INPUT_VAR_7', $HTTP_POST_VARSї'address1']);
define('INPUT_VAR_8', $HTTP_POST_VARSї'postcode']);
for ($i=0; $i<8; $i++) {
if (empty(INPUT_VAR_$i)) {
//Display an error if any required fields were missed
DisplayError("It appears that you have not filled in all of the required fields. Please go back and try again!.");
exit;
}
else {
prepare_db_input(INPUT_VAR_$i); //Prepare table input to avoid security issues
$sql_query = "INSERT INTO tbl_registration VALUES('INPUT_VAR_1', 'INPUT_VAR_2', 'INPUT_VAR_3', 'INPUT_VAR_4',
'INPUT_VAR_5', 'INPUT_VAR_6', 'INPUT_VAR_7', 'INPUT_VAR_8')";
$result = mysql_query($sql_query) or die(mysql_error());
}
}
}Thanks