PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
pessi
Forum Newbie
Posts: 2 Joined: Tue Dec 02, 2003 5:33 pm
Post
by pessi » Wed Jan 30, 2008 2:26 pm
dear all,
Novice here and having problems with simple code. Please help
here is my code
Code: Select all
<form name="form1" action="something.php">
<input type="submit" name="mybutton" value="submit" />
</form>
<?php
if($_POST["mybutton"] == "submit")
echo "Success";
else
echo "Failure";
?>
I donot get a success message even when I click the button.
Thanks in advance,
prasad.
GOT the solution...replaced POST by GET
Christopher
Site Administrator
Posts: 13596 Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US
Post
by Christopher » Wed Jan 30, 2008 3:55 pm
Code: Select all
<form name="form1" action="something.php" method="post">
<input type="submit" name="mybutton" value="submit" />
</form>
<?php
if($_POST["mybutton"] == "submit")
echo "Success";
else
echo "Failure";
?>
(#10850)