Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 23rd, 2004, 06:44 PM
Registered User
 
Join Date: Jun 2004
Location: , MO, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to wndy26 Send a message via Yahoo to wndy26
Default Chapter 2 page 48 'register_globals' question

First, let me say that I am using Apache2Triad from my win xp home pc for testing purposes only.

I did the Try It Out exercise on page 47 to show about register_globals and mine did not come up like the book showed. Does this mean that my register_globals is turned on?

Just curious why it didn't show up the way the book said.

Thanks,



  #2 (permalink)  
Old June 23rd, 2004, 06:53 PM
Registered User
 
Join Date: Jun 2004
Location: , MO, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to wndy26 Send a message via Yahoo to wndy26
Default

Working further in this little section, I added the php code to the title section of my document and it didn't work as expected either. Any clues?

Thanks,



  #3 (permalink)  
Old June 24th, 2004, 07:10 AM
Authorized User
 
Join Date: Apr 2004
Location: Cincinnati, OH, USA.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What were the results you saw?

  #4 (permalink)  
Old June 30th, 2004, 04:58 PM
Authorized User
 
Join Date: Jun 2004
Location: London, , Canada.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm having problems with this section as well. When I try to run movie1.php I get this error:

Parse error: parse error, unexpected $end in C:\Program Files\Apache Group\Apache2\test\movie1.php on line 12

Here is what my movie1.php looks like:

<html>
<head>
<title>Find my Favorite Movie!</title>
</head>
<body>
<?php
    echo "<a href='http://localhost/moviesite.php?favmovie=Stripes'>";
    echo "Click here to see information about my favorite movie!";
    echo "</a>;
?>
</body>
</html>

And here is my moviesite.php:

<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>

Hopefully someone can point out what is wrong.
  #5 (permalink)  
Old July 1st, 2004, 05:34 PM
Authorized User
 
Join Date: Apr 2004
Location: Cincinnati, OH, USA.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The line that reads:
echo "</a>;

Should read:
echo "</a>";

You are missing your end quote.

  #6 (permalink)  
Old July 1st, 2004, 11:07 PM
Authorized User
 
Join Date: Jun 2004
Location: London, , Canada.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, after checking the code over and over I finally realized what I missed. Now that I'm well into Ch. 2 I realize how careful you have to be when entering and checking code. I've been stumped a few times only to find that I've missed a " or a ;. It's really helpful having this forum though. Thanks to everyone who takes time to help us newbies out.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 48 Early Binding jdrake3 VB Components 7 September 27th, 2007 03:27 PM
Stuck on Chapter 2, pg 47-48 Clifton Thompson Beginning PHP 0 January 21st, 2006 08:29 PM
Chapter 8 and register_globals off Oregon BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 3 July 26th, 2005 03:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.