Re: is my form safe enough ?
| From: | Jason Wong | Date: | Fri, 23 Aug 2002 09:06:55 +0000 |
| Subject: | Re: is my form safe enough ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-113728@lists.php.net to get a copy of this message | ||
On Friday 23 August 2002 15:43, Roger Thomas wrote:
> if the below snippet is called form.php,
> have I done enough to prevent something like:
> http://mydomain.com/form.php?var=somejunkVal
>
> nb: my register_globals = on
Why not disable it altogther then you'll have less to worry about.
> <?
> if ($_POST["submit"]) {
> print "the value that you typed was:". $_POST["var"];
> /*
> write $_POST["var"] to db
> ...
> ...
> ...
> */
> }
> else {
> ?>
Looks good, as long as you stick to $_POST then you're OK.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Yow! We're going to a new disco!
*/