Ordinary_Shepp Posted April 3, 2014 Share Posted April 3, 2014 Let us see the code first, <?php require_once 'func.php'; connect() ; ?> <!DOCTYPE html> <html> <head> </head> <body> <header> <h1 align='center'>Division Input System</h1></header> <form method="post" action="divprocess.php" enctype="multipart/form-data"> <table> <tr> <td> Division </td> <td> <input type="text" name="name" /> </td> </tr> <tr> <td> Zeo Code </td> <td> <input type="text" name="zeocode" /> </td> </tr> <tr> <td> </td> <td><input type="submit" value="Submit"></td></tr> </table> </form> </body> </html> Now if I want to enable the submit button only when the two field are populated with data what should I do ? Quote Link to comment https://forums.phpfreaks.com/topic/287502-how-to-ensure-all-the-input-box-in-the-form-is-filled/ Share on other sites More sharing options...
Solution ginerjm Posted April 3, 2014 Solution Share Posted April 3, 2014 You can't without using js. Or you can get the post values in your php, check them and then send the screen back with whatever they did provide and a message Quote Link to comment https://forums.phpfreaks.com/topic/287502-how-to-ensure-all-the-input-box-in-the-form-is-filled/#findComment-1474860 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.