Jump to content

[SOLVED] isset and Form post


acctman

Recommended Posts

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.

 

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".

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'

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.