I have a script which creates a message box, and I want to use it for a form validation. When the form is submitted, if the required data hasn't been entered the message box pops up and tells the user to make sure all their data is correct. The problem is, I don't know where abouts I should include the script file!!
the order form is called order.php
the message box script is called msgbox.inc.php
the final page is called process.php
Where should I put the script? If I put it in order.php then the script will run every time the page is loaded. But if I put it in process.php then it will run on the wrong page. Would it work if I use the isset() function on the order page to check if the form has been submitted?
the order form is called order.php
the message box script is called msgbox.inc.php
the final page is called process.php
Where should I put the script? If I put it in order.php then the script will run every time the page is loaded. But if I put it in process.php then it will run on the wrong page. Would it work if I use the isset() function on the order page to check if the form has been submitted?