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
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 Display Modes
  #1 (permalink)  
Old January 16th, 2005, 06:24 PM
Registered User
 
Join Date: Jan 2005
Location: Liverpool, Merseyside, United Kingdom.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default undefined variable !!

Having tried PHP4 a few months ago I gave up after most of the scripts failed and displayed errors. Second time round and things seem to be better, installed php4, installed apache and installed phpMyAdmin. Now i have inserted some code into page and it displays a few lines of errors like the one below. When I upload onto my remote server it works fine. I have a feeling that something in my php.ini file needs changing, could anyone put me in the right direction, i also remember changing the path for my host I think in php.ini but the problem is I need to locate it again.......where would this be and what needs changing, also can I make the change via apache console??

Thanks in advance guys

Mark

Notice: Undefined variable: Price in C:\Program Files\Apache Group\Apache2\htdocs\listbox.php on line 5
Price Range:


Reply With Quote
  #2 (permalink)  
Old January 17th, 2005, 03:10 AM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

just means that you have to set the variable , variables can't have spaces in them im pretty sure! just put in something lke

$price = whatever

Reply With Quote
  #3 (permalink)  
Old January 18th, 2005, 05:50 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 1 Time in 1 Post
Default

This problem has to do with register_globals, I believe.

Replace $Price in your code with $_POST['Price'] if your form method is POST and $_GET['Price'] if your form method is GET.

hth,

-Snib - http://www.snibworks.com
Where will you be in 100 years?
Reply With Quote
  #4 (permalink)  
Old January 20th, 2005, 05:47 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

Lots of old posts about this topic. Check out the old FAQ from a few years ago on this.
  http://p2p.wrox.com/archive/beginnin...2002-11/17.asp


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
Undefined variable adel_88 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 July 9th, 2007 04:21 PM
Undefined Variable aspire Beginning PHP 4 July 12th, 2006 08:00 AM
Undefined variable najib Beginning PHP 4 July 1st, 2005 09:12 AM
Undefined Variable fpolan Beginning PHP 9 July 15th, 2004 07:24 AM
Undefined Variable Some Help! knight Beginning PHP 7 February 19th, 2004 07:07 AM



All times are GMT -4. The time now is 10:15 PM.


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