and here's the action page:
elseif ($_GET['color'].value="2") then $gar="blue";
else $gar="yellow";
echo $gar; ?>
WTF is wrong with this? Anytime I run the first page, I get:
Help?
EDIT: Fixed.
Whats up the the $_GET['color'].value bit? PHP is not Javascript, all you need is $_GET['color']
Code: <html> <body> <?php echo $_GET['color'].value; if ($_GET['color'].value == "1") { $gar="red"; } elseif ($_GET['color'].value == "2") { $gar="blue"; } else { $gar="yellow"; } echo $gar; ?> Okay, I've edited twice. This time should do it.
elseif ($_GET['color'].value == "2") { $gar="blue"; } else { $gar="yellow"; } echo $gar; ?>
Okay, I've edited twice. This time should do it.