Form Action - PHP function?
Posted: Mon Oct 27, 2008 12:02 am
I am writing a form that will create a user in my application. I have a page called AddUser,php which contains the form. I want the php code that I use to check the input and store in the database to be on this same page, but I have no idea how to do it. I set the form action to "AddUser.php" but it ended up creating a blank entry in my database in addition to the submitted info. I tried adding an onclick on the submit button that would call a php function on that page but that didn't work either. A friend told me to use a hidden input field to accomplish this, but is there an easier way?