RE: [PHP] newbie problem working with Forms - undefined constant?
| From: | Lawrence dot Sheed at dfait-maeci dot gc dot ca | Date: | Wed, 15 Nov 2000 09:55:50 +0000 |
| Subject: | RE: [PHP] newbie problem working with Forms - undefined constant? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-25402@lists.php.net to get a copy of this message | ||
What its saying is that you're using a define called password
You haven't declared that define to be a value, so its making the contents
password.
Eg
<?php
print "password:". PASSWORD;
?>
Here we haven't defined PASSWORD to be anything, so its making PASSWORD
equal PASSWORD
password:PASSWORD
But here
<?php
define("PASSWORD", "its a secret");
print "password:". PASSWORD;
?>
We have defined password, so it will show:
password:its a secret
Lesson one. Declare you're variables before you use them. Or turn off
warnings about undeclared vars...
-----Original Message-----
From: Philip Lindsay [mailto:phil@presence-multimedia.co.uk]
Sent: November 15, 2000 05:51 PM
To: PHP list
Subject: [PHP] newbie problem working with Forms - undefined constant?
Hi,
I've really only been using PHP for three weeks though so bear with me if
this sounds a bit daft.
I have some scripts which piece together to build a message board with a
mysql database. The scripts come from the SAMS book - Teach Yourself PHP in
24 hours (ch. 23).
On one of the pages is a form which extracts the users details and logs them
into the database when they join - but I receive errors such as :
Warning: Use of undefined constant password - assumed 'password' in
c:\program files\apache group\apache\htdocs\mysql\join.php on line 11
I have the value of each input box as form[login], form[password] etc.. and
it seems to be tripping over these. Can anyone shed any light on this
problem? I can send the code if it may help?
Cheers in advance,
Phil
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net