Menu
Right now, I have a HTML form… it inserts text boxes into a MySQL database after clicking a button which executes a seperate php file to do these inserts for the form “action.” I want to make sure that some of the required text box fields are not empty before it proceeds to execute the script. I can’t have php echo or alert because I do not want the user losing all of the info he typed in because he forgot a required field. (because of the refresh) // is there anyway to do something like this:
form action=”foo();”
javascript…
foo() {
// check that text boxes arent empty
// if they arent… execute php insert script
}