name="submit"
works normally like it should
if(isset($_POST["submit"]))
<input type="submit" ID="asdf" name="submit" value="Save" class="ui blue mini button">
I will like to use the ID element instead
if(isset($_POST["asdf"]))
<input type="submit" ID="asdf" name="submit" value="Save" class="ui blue mini button">
i dont know how to do this, i have tried if(isset($_POST["#asdf"]))
no luck
2
Answers
No, you cannot access the ID of the element in the
$_POST
array, only the name. If you do this:print_r( $_POST )
You will see the key that can be accessed, and their values.
IDs are not passed in a form submission. You can, however, have multiple
<input type="submit">
fields with different names, and act accordingly.will give you a
$_POST['asdf']
with valueSave
.