Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder Ranger56's Avatar
    Join Date
    Mar 2005
    Location
    Kent, WA.
    Posts
    783
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Very noobish problem...

    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:
    Code:
    <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:
    Code:
    <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!

  • #2
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Change _$REQUEST to $_GET

  • #3
    Regular Coder Ranger56's Avatar
    Join Date
    Mar 2005
    Location
    Kent, WA.
    Posts
    783
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •