Thy words are wise, milord.
Bogdan
John W. Holmes wrote:
Also, please note that if you're using MySQL you don't have to bother
at
all security-wise - MySQL won't accept more than one query per
mysql_query(). You do have to bother about regular errors though - if
$f_namn or $email contain quo
> Also, please note that if you're using MySQL you don't have to bother
at
> all security-wise - MySQL won't accept more than one query per
> mysql_query(). You do have to bother about regular errors though - if
> $f_namn or $email contain quotes (which $email might well contain)
then
> you're goin
Also, please note that if you're using MySQL you don't have to bother at
all security-wise - MySQL won't accept more than one query per
mysql_query(). You do have to bother about regular errors though - if
$f_namn or $email contain quotes (which $email might well contain) then
you're going to e
> >addslashes should be enough and put qoutes arround your strings in the
sql
>
> Meaning that a query like this one is safe, as long as I first have
> $e_namn = addslashes($e_namn);?
>
> $query = "INSERT INTO addr (last_name, first_name, email)
> VALUES(\"$e_namn\",\"$f_namn\",\"$email\")";
Yea
addslashes should be enough and put qoutes arround your strings in the sql
Meaning that a query like this one is safe, as long as I first have
$e_namn = addslashes($e_namn);?
$query = "INSERT INTO addr (last_name, first_name, email)
VALUES(\"$e_namn\",\"$f_namn\",\"$email\")";
--
PHP Gene
addslashes should be enough and put qoutes arround your strings in the sql
At 14:58 18-12-02 +0100, Anders Thoresson wrote:
Would this function do the trick?
// validate.php - functions that validates form input
function validate_string($unsafe_string) {
// create array containing b
resson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 8:58 AM
Subject: [PHP] preventing sql injections
> Would this function do the trick?
>
>
> // validate.php - functions that validates form input
>
> function validate_
Would this function do the trick?
// validate.php - functions that validates form input
function validate_string($unsafe_string) {
// create array containing bad words
$badwords = array(";","--","select","drop","insert","xp_","delete");
$goodwords = array(":","---","choose","leave","add",
8 matches
Mail list logo