Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 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 October 26th, 2003, 01:59 PM
Authorized User
 
Join Date: Oct 2003
Location: , Ok, .
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default CH 3 pg 76

YES!! I have read all the facts and posts on this subject already.
YES!! I have read the information on php.net already.
YES!! I have tried every code example in these forums.

Yes, my phpinfo page shows up fine.
Some scripts seem to work, this one absolutly will not.

My global is off, Im using WXP Pro and PHP API version 20020918.
Yes, my registered streams include .php.

After reading all the posts on this subject I cannot believe Im still having a problem and yet, nothing shows up.

The first page:
<html><head><title>Author</title></head>
<body>
    <form method = get action = "text.php">
        <p>Who is your favoriate author?
            <input name = "author" type = "text">
            <br />
            <input type = submit>
        </p>
    </form>
</body>
</html>

The Second page:
<html><head><title>Author</title></head>
<body>
    <p>Your favoriate author is:
        <? php echo $author = $_GET['author'] ; ?>
        </p>
</body>
</html>

  #2 (permalink)  
Old October 26th, 2003, 02:01 PM
Authorized User
 
Join Date: Oct 2003
Location: , Ok, .
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK. Im STUPID!!

I just posted on this problem and I just fixed it.

The second page I had:
<? php echo $author = $_GET['author'] ; ?>

If you look closly, I have a space between ? and php.
After coping that to the previous post I accidently hit the back space and it took care of it. It actually took a minute to figure out what happened.




  #3 (permalink)  
Old October 26th, 2003, 08:46 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also, you don't need an assignment statement in the receiving page. Technically, you're first assigning the value of $_GET['author'] to $author, then echoing the contents of $author to the user.

It's more efficient/streamlined if you just:
  echo $_GET['author'];


Take care,

Nik
http://www.bigaction.org/


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 5 Arrays Pg 134 Sadlowski BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 2 February 23rd, 2006 01:25 PM
Ch 2 pg 24 "Using the Properties..." LuluDev BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 January 23rd, 2006 09:12 AM
CH 3 pg 96 Question mririe BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 8 August 25th, 2004 04:17 AM
CH 5 pg 160 wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 8 November 12th, 2003 11:23 PM
CH 4 Pg 143 HTMLSpecialChars wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 November 3rd, 2003 02:29 PM





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