On Monday 07 August 2006 19:39, Peter Lauri wrote:
[snip]My guess: magic_quotes_gpc is enabled where you're running the
script. Therefore slashes are already present in the data from the form
post.[/snip]
Should I turn it off? Adding slashes and mysql_real_escape_string is not
exactly the
']));
Something that we are missing out here?
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 08, 2006 5:54 AM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] Mixing sprintf and mysql_real_escape_string
On Mon, August 7, 2006 12:35
Hi,
I get strange output if I combine sprintf and mysql_real_escape_string. If I
do this the resulting into the database is \' not ' as I want.
mysql_query(sprintf(INSERT INTO table (value1, value2) VALUES (1, '%s'),
mysql_real_escape_string( ' )));
Should this be like this? Do the sprintf
On Mon, August 7, 2006 12:35 pm, Peter Lauri wrote:
I get strange output if I combine sprintf and
mysql_real_escape_string. If I
do this the resulting into the database is \' not ' as I want.
mysql_query(sprintf(INSERT INTO table (value1, value2) VALUES (1,
'%s'),
mysql_real_escape_string(
Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] Mixing sprintf and mysql_real_escape_string
On Mon, August 7, 2006 12:35 pm, Peter Lauri wrote:
I get strange output if I combine sprintf and
mysql_real_escape_string. If I
do this the resulting into the database is \' not ' as I want
slashes are already present in the data from the form post.
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 08, 2006 5:54 AM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] Mixing sprintf and mysql_real_escape_string
On Mon, August 7
[snip]My guess: magic_quotes_gpc is enabled where you're running the script.
Therefore slashes are already present in the data from the form post.[/snip]
Should I turn it off? Adding slashes and mysql_real_escape_string is not
exactly the same thing, correct?
/Peter
--
PHP General Mailing List
7 matches
Mail list logo