Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #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>

Reply With Quote
  #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.




Reply With Quote
  #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/
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 01:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.