I was unable to get the PHP script running, to be honest I'm not sure what my problem was. I was unsure as to process radio button data so I switch the format to a drop down menu because I thought it would be easier. At frst I could get text to appear using the echo command, but after tinkering around for an hour I couldn;t et it to appear with CSS, or without it. My code is posted below:
$age and $name are from the form page but it's strange that the first line of code won't even show on the screen even though there's no arguments to make it not work. I'm flabbergasted by this new and strange language, I looked up multiple tutorials on http://www.tizag.com/phpT/forms.php including:
forms and php
if statements
Overall I have failed at PHP and it's frustrating because it does not seem a very difficult structured language like Action-Script 3.0 which I already know.
$age = $_POST['age'];
$name = $_POST['name'];
echo "Congratulations".$name" you have passed the first test";
if ($age == "0-18")
{
echo "You are too young to be a member!";
}
if ($age == "18-65")
{
echo "Pay your standard dues!!";
}
if ($age == "65+")
{
echo "You get a 10% discount!";
}
?>
Monday, April 28, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment