|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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... |
|
#2
|
|||
|
|||
|
RE: undefined constant
You should place the key of the array in quotes:
$make=$_POST['make']; |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
RE: undefined constant
which one is line 7?
|
|
#5
|
|||
|
|||
|
RE: undefined constant
It would appear that
$make=$_POST[make]; is line 7 |
|
#6
|
|||
|
|||
|
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... |
|
#7
|
|||
|
|||
|
RE: undefined constant
On this site? If so, let me know...I need to go in and add the quotes...
|
|
#8
|
|||
|
|||
|
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!! |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > undefined constant |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|