I would like to test my button can get the current value from the date\'s textbox? I got the value of submit button but I couldn\'t find any code get name of the button. So
If you'd like to get the value of 'oprf' above, then:
$value = $_POST['obrf'];
Should do it in php.
You can try this one
if(isset($_POST['oprf'])) {
echo $_POST['oprf'];
}
Hope this helps
Add type property with submit type="submit"
to button tag this will submit the form then receive the form inputs value in php script with super global variable $_POST['input name']
or $_GET[]
wdepends on from action property value by default GET.
You can do:
if ($_POST['oprf'] == '' || $_POST['oprf'] == NULL) {
//this checks to see if there has been a value that was sent with the
//form
}
I usually use isset for cookies.
I don't think this works consitently in all browsers. Better to work with a customized name
attribute.