dhmyers82 Posted March 2, 2015 Share Posted March 2, 2015 Please tell me if I am thinking correctly I have a .html doc with a form. The form has an action calling a php file. The action is called when I hit submit. How does it work with an all-in-one form? Why is the php running as the page loads and not when I hit submit? Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted March 2, 2015 Share Posted March 2, 2015 this and your last 3 threads have been posted in the wrong forum section, requiring someone on the staff to move them. the Php Regex form section is for help with regular expressions, i.e. pattern matching. it is not for other types of programming questions. Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted March 2, 2015 Share Posted March 2, 2015 I have a .html doc with a form. The form has an action calling a php file. The action is called when I hit submit. Correct. How does it work with an all-in-one form? What do you mean by this? Quote Link to comment Share on other sites More sharing options...
dhmyers82 Posted March 2, 2015 Author Share Posted March 2, 2015 Sorry, where would you like me to post questions like this? Quote Link to comment Share on other sites More sharing options...
dhmyers82 Posted March 2, 2015 Author Share Posted March 2, 2015 When it is a .php file with a form and the action calls itself. The validations are running before the user even has a chance to enter in any data. I just reread the question and I think they should be separate files with all the data being appended to a "single" .txt file Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted March 2, 2015 Share Posted March 2, 2015 When it is a .php file with a form and the action calls itself. The validations are running before the user even has a chance to enter in any data. Not at all. PHP is only executed when a request is sent to the server, ie the user clicks a link, submits a form. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted March 2, 2015 Share Posted March 2, 2015 you need logic in your code to detect that the form was submitted and only use the submitted data when it has. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.