Can somebody please help me, I think I am going crazy! When I run my page I cannot get the isset function to work with submit buttons. It workes fine for other form post items like input text, radio or checkboxes. In my project I have a lot of checks like this to see what submit button was pressed and I was sure that they were working last week when I last tested my application, but yesterday when I sat down to do more development the isset function just won’t work on my buttons. I generated a simple test file to demostrate what I trying to accomplish. When I run this php file and click on the submit button I get “Not pressed” everytime.
Thanks
Scott
<?php
if (isset($_POST[‘btnLogin’])){
print “Button was pressed”;
}else{
print “Not pressed”;
}
?>
<html>
<head>
<title>Test</title>
</head>
<body>
<form method=”POST” action=<?php print $PHP_SELF; ?> >
<button type=”submit” name”btnLogin” value=”0″>Push Me</button>
</form>
</body>
</html>