Re: $_POST in MySQL query issue...
| From: | Jon Kriek | Date: | Fri, 17 Oct 2003 01:06:40 +0000 |
| Subject: | Re: $_POST in MySQL query issue... | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31089@lists.php.net to get a copy of this message | ||
Actually, I meant to suggest addslashes() and mysql_espace_string()
--
Jon Kriek
http://phpfreaks.com
"Jon Kriek" <kriek@phpfreaks.com> wrote in message
news:20031017010154.41053.qmail@pb1.pair.com...
> I concur, assign the superglobal array to a variable ...
>
>
>
> $Name = strip_slashes($_POST['elementName']);
> $sql="INSERT INTO $table SET Name='$Name'"];
>
> ... and then use that opportunity to run additional checks on the content.
>
> --
> Jon Kriek
> http://phpfreaks.com