Re: My Short Variable is not working
| From: | disguised dot jedi at gmail dot com | Date: | Fri, 22 Jul 2005 19:35:45 +0000 |
| Subject: | Re: My Short Variable is not working | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-26224@lists.php.net to get a copy of this message | ||
On 7/22/05, Afolabi Richard <richardesquire@yahoo.com> wrote:
> Hi all,
>
> I am a PHP newbie using WAMP5 version 1.1
>
> I have tried coding PHP and I see it as very interesting and fascinating. however, I have a
> > challenge: My short variables e.g "$names", "$email" are not working when
> I use "echo" > command with it, except I use "echo $_POST[fieldname]".
> meanwhile, I set the
> "global_registers = On" in my php.ini file but the story is the same.
It's register_globals, and it shouldn't be turned on. It allows
ANYONE to define ANY VARIABLE in your script. Not a good idea.
Search your php.ini file for the phrase "register_globals" and set it
to on, and the sample you attached will work (even though it's
insecure).
Also, you should do $_POST["fieldname"] instead of $_POST[fieldname].
They'll both work (I believe) but the first is the correct way to do
it, you are accessing a named key with the name of that string.
>
> Is there something else I have not done, pls help I am getting to LOVE PHP and MYSQL.
Good, I agree...It can be really fun once you get to know it!
--
PHP rocks!
"Knowledge is Power. Power Corrupts. Go to school, become evil"
Disclaimer: Any disclaimer attached to this message may be ignored.
However, I must say that the ENTIRE contents of this message are
subject to other's criticism, corrections, and speculations.
This message is Certified Virus Free