Re: [PHP] Update problem

2004-06-07 Thread Mattias Thorslund
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['

Re: [PHP] Update problem

2004-06-07 Thread Mattias Thorslund
That will work, but the below is really supposed to work. I use it in my apps. Blake Schroeder wrote: Put a hidden field in your form named id. -Blake Mattias Thorslund wrote: Probably with Blake Schroeder wrote: The form that is being submitted can only be a POST or a GET not both example:

Re: [PHP] Update problem

2004-06-07 Thread Blake Schroeder
Put a hidden field in your form named id. -Blake Blake Schroeder wrote: The form that is being submitted can only be a POST or a GET not both example: How can you do both? -Blake Maldiv wrote: Hello, I have a php update form which use $_POST and $_GET too. I call the update like this update.ph

Re: [PHP] Update problem

2004-06-07 Thread Marek Kilimajer
Blake Schroeder wrote: The form that is being submitted can only be a POST or a GET not both example: How can you do both? Hope that answers your question ;-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Update problem

2004-06-07 Thread Blake Schroeder
The form that is being submitted can only be a POST or a GET not both example: How can you do both? -Blake 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 lik

[PHP] Update problem

2004-06-07 Thread Maldiv
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

RE: [PHP] A PHP UPDATE problem

2003-03-09 Thread John W. Holmes
> I am creating a polling system. Its operation likes this: > when the people vote the item, it updates the database by adding 1 for the > item automatically. > The part of code is showed here: > > $colname_rsAddVote = "1"; > if (isset($HTTP_POST_VARS['Vote'])) { > $colname_rsAddVote = (get_magic

[PHP] A PHP UPDATE problem

2003-03-08 Thread Terry Lau
Hello, I am creating a polling system. Its operation likes this: when the people vote the item, it updates the database by adding 1 for the item automatically. The part of code is showed here: $colname_rsAddVote = "1"; if (isset($HTTP_POST_VARS['Vote'])) { $colname_rsAddVote = (get_magic_quotes_

[PHP] UPDATE problem

2001-08-20 Thread Martin Kampherbeek
Hello, I have created a predictionscompetition and some code counts te total score of a match of a person. On the screen it workes, but in de database it goes wrong. Each person gets the total of the last person. There must be something wrong with the update statement. I hope someone can help m