I am trying to update records with a image button. here is my code:
<?php
if(isset($_POST['unstar'])) {
echo "good!";
}
?>
<form action='' method='post'>
<input type='image' src='http://mysite.com/images/starIcon.png' name='unstar' id='unstar' />
</form>
When I click on the image, it does not echo “good”. what am I doing wrong?
The problem is that you’re not giving
unstara value, so it won’t be detected as Set by the function.