I’m currently trying to insert and update a simple mysql database I’m running on my free service. I have uploaded the php script onto my website but for whatever reason it doesn’t seem to be picking up any of the input forms data?
The form (jotform) creates an array of all the forms input data that is simply passed into my php script. This should simply open my database and either insert or update a record depending on submission_id…
I’ve added the line print_r($_POST); to my script but it always shows array() empty?
That would mean the POST data is not submitted correctly to the script. Can you check the HTML code of your form? Please make sure that the form method is set to POST and that the right URL is used (by default, POST data is not persisted after a redirect).
The database code looks OK too, so this may not be a database issue (although the code in the example does not use parameterized queries or input validation/sanitization, making it completely open to SQL Injection Attacks).