how could i set a variable with a submit button in order to differenciate 2 behaviours, so first time the same submit button will insert in database and in second time it updates database values.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depends on your implementation, and if it’s ajax..
If ajax, you want to make a note of the fact it’s an update somewhere.. perhaps a form element that says so?
and on the first submit
If posting to the server, you can include the in the code so when the form is submitted again, you can access $_REQUEST[‘formUpdate’] (such as with php, anyway) ..
hope that helps ya