westminster86 Posted April 7, 2008 Share Posted April 7, 2008 Im using the isset function as follows. if (isset($_POST['submit'])) { // check form fields } The problem im having is the call to the display_form_button() function doesnt have a input type, therefore the $_POST['submit'] is not set. If I were to add submit to the input type, the isset function works, but then it doesnt display the button ive created, it displays the html button. function display_form_button($image, $alt) { echo "<center><input type = image src=\"$image".".gif\" alt=\"$alt\" border=0 height=32 width=100 name=\"submit\" ></center>"; } Quote Link to comment Share on other sites More sharing options...
rhodesa Posted April 7, 2008 Share Posted April 7, 2008 Instead of changing your button, can you change your IF? I usually use this as my POST check: if($_SERVER['REQUEST_METHOD'] == 'POST'){ //check for fields } Quote Link to comment Share on other sites More sharing options...
westminster86 Posted April 7, 2008 Author Share Posted April 7, 2008 I havent come across $_SERVER['REQUEST_METHOD'] before. Ill use it from now on. Thanks for that. 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.