Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | 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
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 16th, 2004, 03:57 PM
Registered User
 
Join Date: Sep 2003
Location: Troy, MI, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to markdawkins
Default Undefined variable error messages

I just installed PHP V4.10 on my apache web server. For whatever reason now I am unable to pass variables from and HTML page to a PHP page. This is an example of the error that I get.

Your favorite author is:
Notice: Undefined variable: Author in C:\Program Files\Apache Group\Apache2\htdocs\ch03\text.php on line 6
_______________________
Here is the code used:

<HTML>
<HEAD></HEAD>
<BODY>
<FORM METHOD=GET ACTION="text.php">
Who is your favourite author?
<INPUT NAME="Author" TYPE="TEXT">
<BR>
<BR>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>

_____________________________________


Can anyone help ? This worked before I changed versions.

MARK G Dawkins
Reply With Quote
  #2 (permalink)  
Old December 17th, 2004, 02:55 AM
Registered User
 
Join Date: Dec 2004
Location: , , Chile.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i got the same error

Reply With Quote
  #3 (permalink)  
Old December 17th, 2004, 11:27 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

When you try to get the value from another page, you MUST use $_GET['Author'] if the form method is GET and $_POST['Author'] if the method is POST.

Otherwise you must turn register_globals on, and that is considered bad.

Please read the PHP FAQ before asking such questions.

Thanks,

-Snib - http://www.snibworks.com
Where will you be in 100 years?
Reply With Quote
  #4 (permalink)  
Old December 31st, 2004, 10:55 AM
Registered User
 
Join Date: Sep 2003
Location: Troy, MI, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to markdawkins
Default

Thanks this helped

MARK G Dawkins
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Notice: Undefined variable error on input form tonyb187 Pro PHP 2 May 11th, 2008 06:58 AM
Undefined variable adel_88 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 July 9th, 2007 03:21 PM
Undefined variable majidnakit Beginning PHP 2 April 16th, 2005 11:23 PM
undefined variable !! cody44 Beginning PHP 3 January 20th, 2005 05:47 PM
Undefined Variable: Error jjmancini Beginning PHP 2 July 27th, 2004 01:38 AM



All times are GMT -4. The time now is 07:51 PM.


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