<html> <body> <?php echo $_GET['color'].value; if ($_GET['color'].value="1") then $gar="red";
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:
Code:
Parse error: syntax error, unexpected '=' in C:\xampp\htdocs\yoo.php on line 5
Help?
EDIT: Fixed.
Post edited at 7:14 pm on Aug. 13, 2007 by RossTheHoss69
------- I'm not changing this line until I get a girlfriend. [7-08-07; 1:26 a.m.] Shït. Piss. Fück. Cünt. Cocksucker. Motherfücker. And Tits. R.I.P George Carlin.
7:06 pm on Aug. 13, 2007 | Joined: Dec. 2005 | Days Active: 966 Join to learn more about RossTheHoss69Texas, United States | Male | Posts: 5,609 | Points: 30,152
Post edited at 7:11 pm on Aug. 13, 2007 by The Dalai Lama
7:09 pm on Aug. 13, 2007 | Joined: Oct. 2006 | Days Active: 489 Join to learn more about The Dalai LamaOntario, Canada | StraightMale | Posts: 8,781 | Points: 12,209
( RossTheHoss69 )
I ♥ LW. :) Patron Tech Support Leader
Quote: from The Dalai Lama at 9:09 pm on Aug. 13, 2007
Yeah. Once I got to thinking, I forgot to add the extra "=". I always get confused with PHP and TI-Basic.
------- I'm not changing this line until I get a girlfriend. [7-08-07; 1:26 a.m.] Shït. Piss. Fück. Cünt. Cocksucker. Motherfücker. And Tits. R.I.P George Carlin.
7:13 pm on Aug. 13, 2007 | Joined: Dec. 2005 | Days Active: 966 Join to learn more about RossTheHoss69Texas, United States | Male | Posts: 5,609 | Points: 30,152
The Dalai Lama
Soothsayer Patron
Yeah, plus you forget the { } for the If command.
7:14 pm on Aug. 13, 2007 | Joined: Oct. 2006 | Days Active: 489 Join to learn more about The Dalai LamaOntario, Canada | StraightMale | Posts: 8,781 | Points: 12,209
Macropiper
Like a Ninja! Patron
Whats up the the $_GET['color'].value bit? PHP is not Javascript, all you need is $_GET['color']
1:59 pm on Aug. 14, 2007 | Joined: Oct. 2002 | Days Active: 2,397 Join to learn more about MacropiperNew Zealand | StraightMale | Posts: 8,998 | Points: 36,900
( RossTheHoss69 )
I ♥ LW. :) Patron Tech Support Leader
Quote: from Tangaroa at 3:59 pm on Aug. 14, 2007
Whats up the the $_GET['color'].value bit? PHP is not Javascript, all you need is $_GET['color']
I know. I got a little confused when I was going fast... I was in a rush to show someone something, and I had to save my work.
------- I'm not changing this line until I get a girlfriend. [7-08-07; 1:26 a.m.] Shït. Piss. Fück. Cünt. Cocksucker. Motherfücker. And Tits. R.I.P George Carlin.
2:31 pm on Aug. 14, 2007 | Joined: Dec. 2005 | Days Active: 966 Join to learn more about RossTheHoss69Texas, United States | Male | Posts: 5,609 | Points: 30,152