acctman Posted May 31, 2009 Share Posted May 31, 2009 would !isset($_POST['delnewguy']) tell me if $_POST['delnewguy'] was not clicked? or will it be set regard if its clicked or not since it apart of the form if ($prev[$status] == 0 && (!isset($_POST['delnewguy']))) { Link to comment https://forums.phpfreaks.com/topic/160370-solved-isset-and-form-post/ Share on other sites More sharing options...
anupamsaha Posted May 31, 2009 Share Posted May 31, 2009 would !isset($_POST['delnewguy']) tell me if $_POST['delnewguy'] was not clicked? or will it be set regard if its clicked or not since it apart of the form if ($prev[$status] == 0 && (!isset($_POST['delnewguy']))) { If "delnewguy" is a submit type button in the form posted, the answer is yes, that it will tell you that the button is not clicked or not. Generally, unless it is clicked, the form will not be posted. Link to comment https://forums.phpfreaks.com/topic/160370-solved-isset-and-form-post/#findComment-846279 Share on other sites More sharing options...
Ken2k7 Posted May 31, 2009 Share Posted May 31, 2009 Nope, not exactly. Although it can view it that way depending how you passed the data to $_POST. !isset($_POST['delnewguy']) more literally states that the $_POST array at index 'delnewguy' doesn't exist, meaning 'delnewguy' is not in $_POST. It's possible to send $_POST data through input fields or AJAX, but that doesn't necessarily mean something is "clicked". Link to comment https://forums.phpfreaks.com/topic/160370-solved-isset-and-form-post/#findComment-846281 Share on other sites More sharing options...
acctman Posted May 31, 2009 Author Share Posted May 31, 2009 Nope, not exactly. Although it can view it that way depending how you passed the data to $_POST. !isset($_POST['delnewguy']) more literally states that the $_POST array at index 'delnewguy' doesn't exist, meaning 'delnewguy' is not in $_POST. It's possible to send $_POST data through input fields or AJAX, but that doesn't necessarily mean something is "clicked". the 'delnewguy' button is an actually onSet/ajax type button... where its not submiting the FORM but if its clicks it sets the value for 'delnewguy' so when the FORM submit button is click its processes 'delnewguy' Link to comment https://forums.phpfreaks.com/topic/160370-solved-isset-and-form-post/#findComment-846294 Share on other sites More sharing options...
Ken2k7 Posted May 31, 2009 Share Posted May 31, 2009 I know how it works, thanks. Link to comment https://forums.phpfreaks.com/topic/160370-solved-isset-and-form-post/#findComment-846295 Share on other sites More sharing options...
acctman Posted May 31, 2009 Author Share Posted May 31, 2009 I know how it works, thanks. thanks for helping me out again. you really know your stuff. Link to comment https://forums.phpfreaks.com/topic/160370-solved-isset-and-form-post/#findComment-846297 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.