...

View Full Version : Very noobish problem...



Ranger56
06-10-2005, 12:42 AM
I got a book about PHP5, Apache, and MySQL. I'm currently in the PHP section and am having some troubles...

The book has examples of what to write to make stuff work, and it isn't working for me...

I have two pages and I'm not sure exactly what is going wrong but this is the error I get.

Parse error: syntax error, unexpected T_VARIABLE in C:\xampplite\test\moviesite.php on line 3



Here's the code to my two pages.

Page 1:

<html>
<head>
<title>Find my Favorite Movie!</title>
</head>
<body>
<?php
echo "<a href='moviesite.php?favmovie=Night&nbsp;of&nbsp;the&nbsp;Living&nbsp;Dead'>";
echo "Click here to see information about my favorite movie!";
echo "</a>";
?>
</body>
</html>


Page 2:

<html>
<head>
<title>My Movie Site - <?php echo_$REQUEST['favmovie']; ?></title>
</head>
<body>
<?php
echo "My favorite movie is ";
echo $_REQUEST['favmovie'];
echo "<br>";
$movierate = 5;
echo "My movie rating for this movie is: ";
echo $movierate;
?>
</body>
</html>

I got it, I had my _ before the $ not after it!

gsnedders
06-10-2005, 12:45 AM
Change _$REQUEST to $_GET

Ranger56
06-10-2005, 01:07 AM
Naw, it's ok. The book is just teaching me basic things right now, so those files are very different now and still work fine.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum