Re: Update problem
| From: | Mattias Thorslund | Date: | Mon, 07 Jun 2004 22:29:04 +0000 |
| Subject: | Re: Update problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187851@lists.php.net to get a copy of this message | ||
To reply to the original post (sorry for the confusion):
Maldiv wrote:
Hello, I have a php update form which use $_POST and $_GET too. I call the update like this update.php?id=1 And after the user submit the form with new data I use command like this: UPDATE table SET id=$_POST['id'] WHERE $_GET['id']='1'; This code works on localhost with Apache 2, Win XP, and Php 4.3.5 but it doesn't works on my real server(Php 4.3.3, Linux, Apache 1.??) I debuged it and I realised that on localhost I have the correct value in the $_GET but in remote $_GET is empty. What can I do? Thanks!I wonder if "track_vars" is off in php.ini? But then, I suppose$_POST['id'] would be empty, too. Anyway, I'd suggest using different names for the GET and POST variables. For instance "new_ID" for the POST variable. /Mattias /Mattias