I have 2 accounts with the same hosting company but on different servers. I have been using this code on both for different data for some time. The data comes from a webform. MySQL was updated recently on one of the servers and the code stopped working. event_id field is set to auto-increment
$query = "INSERT INTO table (event_id, event_date, event_time, event_title, event_code, event_content) VALUES ('', '$event_date', '$event_time', '$event_title', '$event_code', '$event_content')";
I changed the code by removing the event_id from the first line and '', from the second as below and it now works
$query = "INSERT INTO table (event_date, event_time, event_title, event_code, event_content) VALUES ('$event_date', '$event_time', '$event_title', '$event_code', '$event_content')";
I really want to ask whether this is the effect of the MySQL upgrade or something else. I don't really know about coding so it is all trial and error using bits that have been written for me.
Margaret