yobo Posted August 1, 2013 Share Posted August 1, 2013 Hey All, I am in the process of learning PHP so I am not an expert by any means. I am looking for some advice on how I would go about implementing this idea. 1. I have a page called addproduct.php with a form and which also includes the header.php file 2. when the form is submitted on the addproduct.php it goes to the database processing script called addproduct-func.php, 3. the addproduct-func.php page has a conditional that checks to see if the database query succeeded if so it redirects using the header function back to addproduct.php. however what I would like to implement is some form validation and checking before it gets submitted to the addproduct-func.php and only if validation and form checking passes then goto addproduct-func.php. I also would like to output a little success msg informing the user that the record had been added to the database just above the addproduct.php form. I am using bootstrap as my css framework. Many Thanks for your time and help J Quote Link to comment Share on other sites More sharing options...
litebearer Posted August 1, 2013 Share Posted August 1, 2013 Have you tried it? if so, what error(s) did you incur? Quote Link to comment Share on other sites More sharing options...
lemmin Posted August 1, 2013 Share Posted August 1, 2013 If the form action is actually addproduct-func.php, you will probably want to put a little hook at the beginning of that file (or applicable function) to redirect the data to your new validation function and back out. 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.