can any 1 find my error.
Posted: Thu Aug 06, 2009 1:30 pm
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
Hello,
After reading this script you will understand. that i am a NEW NEWBIE to php.
.Actually i was runing my mind on a html script in which user enter his mood value into the form and php do the answering.
but its not working.
please help.
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
Hello,
After reading this script you will understand. that i am a NEW NEWBIE to php.
but its not working.
please help.
Code: Select all
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<?php
if (isset($_POSTGET[$mood])){
switch ($mood)
{
case "happy":
print "i am happy";
break ;
case "sad":
print "i am sad" ;
break ;
default:
print "nethier happy nor sad";
}
}
?>
<form action="" method="POST"/>
How is your mood?:
<br>
<select>
<option id="mood" value="happy">happy</option><br />
<option id="mood" value="sad">Sad</option><br />
<option id="mood" value="default">default</option><br/>
</select>
<br/>
<input type="submit" name="submit">
</body>
</html>pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: