TIF Posted September 20, 2016 Share Posted September 20, 2016 The book won't get here until sometime tomorrow but I was able to get through chapter one via Kindle without a problem. I created a PHP file with the following HTML form in the beginning: <h3>Committee Volunteer Application</h3><h4>Enter your Faculty ID</h4><form method="post">ID: <input name="soarid" type = "text" /><input type = "submit" value "Go" /></form> This was followed by PHP code that is to act upon the submitted value. However, the script does not wait for the form to be submitted but continues to execute. How do I make it wait for the submit button? BTW, separating this code into its own HTML file, it will run a separate PHP file when called by the form. Link to comment Share on other sites More sharing options...
Larry Posted September 21, 2016 Share Posted September 21, 2016 Hello! I'm not quite following what you mean about the script not waiting for the for to be submitted. Could you explain in more detail or provide more code? Thanks! Link to comment Share on other sites More sharing options...
TIF Posted September 21, 2016 Author Share Posted September 21, 2016 I created a PHP file that requests a login name with an HTML form that uses the POST action. Immediately following this form, I open a database and select that name within a PHP section. The form doesn't wait for an entry & a "submit" click to serve up that name to the PHP select. It runs the select code immediately and then reruns it after the submit click. BTW, I loved chapter one via Kindle. The hard copy is coming today. Link to comment Share on other sites More sharing options...
TIF Posted September 23, 2016 Author Share Posted September 23, 2016 Working around this "feature". Link to comment Share on other sites More sharing options...
Max Posted December 21, 2016 Share Posted December 21, 2016 Shouldn't 'FORM' include <action = "eg_script_to_call.php">?? Link to comment Share on other sites More sharing options...
Larry Posted December 21, 2016 Share Posted December 21, 2016 Good question! Generally you want to specify an action value but if you don't the form will be submitted back to the same page. Link to comment Share on other sites More sharing options...
Recommended Posts