Re: Undefined Variable
| From: | Anthony Ritter | Date: | Sat, 14 Dec 2002 22:34:32 +0000 |
| Subject: | Re: Undefined Variable | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128300@lists.php.net to get a copy of this message | ||
Marco Tabini <marcot@tabini.ca> wrote in message:
> Hey Anthony--
>
> It's definitely a register_globals problem. Your ISP has turned it off
> because it's generally considered a significant security risk.
>
> The best way to solve it is to use the superglobal $_POST to access your
> post data. In your PHP script, change all the variables that you take
> from the form into their $_POST[''] equivalent (see below for a rough
> example--I put the assignments at the beginning because I wanted to
> touch your code as little as possible). Also, keep in mind that you're
> not performing any checks on the data--I'm sure you want to do it once
> you've sorted the current problem out, but the way it is now you're
> leaving yourself exposed to a number of possible attacks.
>
> $thename = $_POST['thename'];
(snipped)
.........................................
Yep.
That did it. Thanks again Marco.
Two more questions:
1. Can you give me some examples about:
"leaving yourself exposed to a number of possible attacks."
and
2. Where can I pick up the PHP magazine in your post sig.
best...
TR