I have a script that inserts data once the submit button is pressed - once it's submitted the form actions itself basically I have an if (isset($_POST['submit'])) running and if it's not meaning form wasn't submitted it's ignored if it is then it runs the code and inserts the data 2 questions about this;
php question
11
I have a script that inserts data once the submit button is pressed - once it's submitted the form actions itself basically I have an if (isset($_POST['submit'])) running and if it's not meaning form wasn't submitted it's ignored if it is then it runs the code and inserts the data
2 questions about this;
1) how do others feel about setting the form to action itself rather than an external fiel
2) problem I seem to be having is that the data isn't being cleared from the form so when I'm refreshing the same info is being entered into db over and over... I tried using exit() that don't work cause then the rest the screen is messed up - I tried dumping the varibles that also didn't work unless I'm doing it wrong
thanks
2 questions about this;
1) how do others feel about setting the form to action itself rather than an external fiel
2) problem I seem to be having is that the data isn't being cleared from the form so when I'm refreshing the same info is being entered into db over and over... I tried using exit() that don't work cause then the rest the screen is messed up - I tried dumping the varibles that also didn't work unless I'm doing it wrong
thanks
- solidsoul
- Big Squid
- aisdbuilder
- Earnie Boyd
- solidsoul
- Big Squid
- ussher
- [1] reply
- Earnie Boyd
- mopsyd
- drmadcow
Next Topics on Trending Feed
-
11