Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP 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 Search this Thread Display Modes
  #1 (permalink)  
Old January 25th, 2004, 04:48 PM
Registered User
 
Join Date: Jan 2004
Location: Ikoyi, Lagos, Nigeria.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning PHP Chapter 3-


I used text.html to get info from text.php. Each time I clicked Submit Query, it brings the text.php page, but without the information. But with the message:
"Your Favourite authur is:
 Notice: Undefined variable : Authur in C:\inetpub\wwwroot\text.php on line 6"

I checked on the codes again and again, but everything is as it is in the Book. Could it be a mistake in the code. Please look into it, because I am a biginner in PHP. This same applies to all the examples in this Chapter, which are Check Box, TextArea, etc.
Reply With Quote
  #2 (permalink)  
Old January 25th, 2004, 05:19 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Hi, the problem relates to the register_globals directive.

The solution is you must access the variable in the $_POST superglobal array, and not as a global variable...

So $_POST['Authur'] instead of $Authur if the method attribute of your html form is set to post.

Or $_GET['Authur'] instead of $Authur if the method attribute of your html form is set to get.

Here is the most important URL you will ever need when dealing with PHP:
http://www.php.net/manual/en/index.php

Here is the specific page on super-global variables:
http://www.php.net/manual/en/languag...predefined.php

A page discussing why register_globals is a potential security risk:
http://www.php.net/manual/en/securit...terglobals.php

More topics on p2p that discuss this:
http://www.google.com/search?q=regis...e:p2p.wrox.com

: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
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
chapter 10 Emailing with php - firstmail.php vijdev BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 July 19th, 2007 01:12 AM
begin php & mysql - chapter 12, user_form.php jon_stubber Beginning PHP 1 March 9th, 2006 10:57 AM
Beginning PHP: CH17, PHP Directory cyberjacky Beginning PHP 1 March 12th, 2004 11:39 AM
Beginning php 4 chapter 10 problems dakey Beginning PHP 3 February 13th, 2004 06:21 PM
Beginning php 4 chapter 10 problems ade Beginning PHP 2 June 19th, 2003 02:43 PM



All times are GMT -4. The time now is 03:09 PM.


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