Replies To: Hidden Field Not being Retrieved

Re: Hidden Field Not being Retrieved

Posted 07 October 2012 - 03:31 PM

The problem there would be that the "Update" button is redirecting the user using Javascript, instead of submitting the form. When you do that, none of the form data will be sent with the redirect. You should be using a simple <input type="submit" value="Update"> button instead.

Also, I should point out that your code is wide open to SQL Injection. You don't even check to see if the $_POST values in the update_content PHP script were sent, you just pass them directly into a SQL query. - At no point, ever, should the $_POST array be used directly in an SQL query. Never! If you are going to use the old mysql_query function to execute a query, all values that are going into the query should be passed through the mysql_real_escape_string function first.