whats worng in this code???????
it give this errroe
Parse error: syntax error, unexpected T_VARIABLE in D:\xampp\htdocs\soomrof\a_task_2_1.php on line 8

<? include("connection.php");
mysql_query("update doctor_schedule_information set  monday='"$_POST['m']"',tuesday='" $_POST['t']"',wednesday='"$_POST['w']"',thursday='" $_POST['th']"',friday='" $_POST['f']"',saturday='" $_POST['st']"',sunday='"$_POST['su']"' where doctor_ID='"$_POST['d_id']"'")or die(mysql_error());

header("location:admin.php");
?>

Recommended Answers

All 2 Replies

Misquoted:

mysql_query("update doctor_schedule_information set monday='{$_POST['m']}',tuesday='{$_POST['t']}',wednesday='{$_POST['w']}',thursday='{$_POST['th']}',friday='{$_POST['f']}',saturday='{$_POST['st']}',sunday='{$_POST['su']}' where doctor_ID='{$_POST['d_id']}'") or die(mysql_error());
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.