Jump to content

how to remove form field value in php


beboo002

Recommended Posts

Hello Freaks,

 

 

My question is how to remove form field value after inserting the database.

 

Take an example that you have submit the form and form value store in the database .

Form action is same.

 

Here I am not using header (location:xyz.php).

 

If you refresh the page then duplicate value store in database.

 

How can I prevent the duplicate value in database while refresh the page?

 

Thanks & Regard

Beboo

 

Link to comment
Share on other sites

Thanks for reply

 

Ok I think both solution is right but in

First reply we need one more column in database if I use mail() then how can I do it.

In Second reply if user fills same form in second time how can I insert the data.

 

My question is how to prevent the duplicate value in database or mail() to refresh the browser

 

Thanks

Link to comment
Share on other sites

what is the value of $_SESSION['checkvar']  in first time it is $_SESSION['checkvar']==1. how can i insert in the if condition.

By default, the $_SESSION['checkvar'] variable will be null as it is not set until it does the insert and mail functionality.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.