PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old September 23rd, 2002, 02:56 PM
Dicky Dicky is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 99 Dicky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
undefined constant

I have been following one of the 'begginers' tutorials on php with MySQL bu I am having trouble with the following:
Notice: Use of undefined constant make - assumed 'make' in c:inetpubwwwrootSupport_Webdatain.php on line 7
This is are the problem lines:
//for new PHP
$make=$_POST[make];
$model=$_POST[model];
$colour=$_POST[colour];
$price=$_POST[price];
//
Please can anyone explain what is meant by this message...

Reply With Quote
  #2  
Old September 23rd, 2002, 03:54 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: undefined constant

You should place the key of the array in quotes:

$make=$_POST['make'];


Reply With Quote
  #3  
Old September 23rd, 2002, 09:36 PM
blazin blazin is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Aurora, CO, USA
Posts: 24 blazin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to blazin Send a message via AIM to blazin
RE: undefined constant

Like anonymous said, you'll need to place the 'make' in quotes, but the same goes for all the other ones. I'd suspect if you just put 'make' in quotes, you'll next see an error that says:

Notice: Use of undefined constant make - assumed 'model' in c:inetpubwwwrootSupport_Webdatain.php on line 8



Reply With Quote
  #4  
Old September 24th, 2002, 12:44 AM
laidbak laidbak is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Paramount, CA, USA
Posts: 1 laidbak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to laidbak Send a message via AIM to laidbak Send a message via Yahoo to laidbak
RE: undefined constant

which one is line 7?

Reply With Quote
  #5  
Old September 24th, 2002, 09:13 PM
blazin blazin is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Aurora, CO, USA
Posts: 24 blazin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to blazin Send a message via AIM to blazin
RE: undefined constant

It would appear that

$make=$_POST[make];

is line 7

Reply With Quote
  #6  
Old September 25th, 2002, 06:56 AM
Dicky Dicky is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 99 Dicky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: undefined constant

Thank you all for your help it was the missing quotes that was causing the problem.
I had been following one of the tutorials on the site and the quotes were missing from the example - but hey now I know, won't make that mistake again...

Reply With Quote
  #7  
Old September 25th, 2002, 10:55 AM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: undefined constant

On this site? If so, let me know...I need to go in and add the quotes...

Reply With Quote
  #8  
Old September 26th, 2002, 08:31 PM
Dicky Dicky is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 99 Dicky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: undefined constant

The tutorial in question was under php coding - Basics; http://codewalkers.com/tutorials.php?show=9&page=9
Even with this small omission I have found it to be an excellent tutorial!!

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > undefined constant


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT