You call mysql_query() twice, once with a non-existent $sql parameter:
mysql_query("UPDATE service SET Start_date='$Date1', Venue='$Venue', Facilitator='$Faci' WHERE ServiceID ='$id'"); if (!mysql_query($sql,$con))
it should be:
if (!mysql_query("UPDATE service SET Start_date='$Date1', Venue='$Venue', Facilitator='$Faci' WHERE ServiceID ='$id'"))
You also do not avoid input, leaving you open for SQL injection. You should use the bound parameters ideally, or at least run your parameters with mysql_real_escape_string() .
For example:
$Date1 = mysql_real_escape_string($Date1, $conn);
Greg
source share