I have an html page that submits a form through javascript. Before submitting the form I change the value of a hidden tag which I then try to get in php but it doesn't work. It appears blank.
Here is the javascript
function remove(){
remove.value = 'true';
document.newrow.submit() ;
}
The value for remove is set successfully however when I submit the form I get a blank value.
Here is the php code to retrieve the value.
$test = $_POST['remove'];
echo $test;
any idea why the value is blank?
Thanks
<form name = 'newrow' action = 'update.php' method = 'post'>
<input type='hidden' name='remove' id = 'remove' /><a href='javascript:remove()'><img src = 'images/delete.png' / ></a>
removeis a DOM element that isn't even in it.