Hi,
I am getting some input from a client in a text area, the input is an sql
statement, so I am using addslashes but the damn thing is not working...any
idea why?
Heres my code:
if(isset($_POST['the_sql_command']))
{
$the_sql_command=$_POST['the_sql_command'];
On Monday 12 January 2004 12:31, Ryan A wrote:
I am getting some input from a client in a text area, the input is an sql
statement, so I am using addslashes but the damn thing is not working...any
idea why?
Heres my code:
if(isset($_POST['the_sql_command']))
{
Hi,
Thanks for replying.
*
addslashes() _enables_ you to enter stuff which contains
quotes into the DB properly, but the slashes are obviously not part of the
data and hence not stored.
*
but the whole sql statement is part of the data right? I mean I am saving
the whole
sql statement for later
On Monday 12 January 2004 13:25, Ryan A wrote:
addslashes() _enables_ you to enter stuff which contains
quotes into the DB properly, but the slashes are obviously not part of the
data and hence not stored.
*
but the whole sql statement is part of the data right? I mean I am saving
the
Hi,
I have a problem that lets you add a record to a database. THere is a
problem with it, and the following is the area of the program where it has
problem.
$created_date = date('m, d, Y');
$title = strip_tags($title);
$keywords = strip_tags($keywords);
MS-SQL doesn't escape with slashes. It escapes single quotes with single
quotes.
--
Lowell Allen
From: Poon, Kelvin (Infomart) [EMAIL PROTECTED]
Date: Thu, 20 Mar 2003 10:58:02 -0500
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: [PHP] Addslashes problem (MSSQL)
Hi,
I have
, 2003 11:20 AM
To: PHP
Subject: Re: [PHP] Addslashes problem (MSSQL)
MS-SQL doesn't escape with slashes. It escapes single quotes with single
quotes.
--
Lowell Allen
From: Poon, Kelvin (Infomart) [EMAIL PROTECTED]
Date: Thu, 20 Mar 2003 10:58:02 -0500
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED
Kelvin,
This link should be helpful:
http://www.mysql.com/doc/en/String_syntax.html
Regards,
Michael Egan
-Original Message-
From: Poon, Kelvin (Infomart) [mailto:[EMAIL PROTECTED]
Sent: 20 March 2003 16:21
To: 'Lowell Allen'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Addslashes problem
PROTECTED]' [EMAIL PROTECTED]
Subject: RE: [PHP] Addslashes problem (MSSQL)
What do you mean by It escapes single quotes with single quotes.?
so let's say my $content is
lalal 'lalalal' lalala
then what do I have to do to $content in order to insert to my MSSQL table?
-Original Message
I have to use addslashes on a string of mine so I can use it in a javascript
function, so that when a link is clicked, a html textarea box is populated
with that string.
The problem I have is that if there are line breaks in the string, the
br's seem to get created when addslashes is run on the
maybe i don't undestand correctly but try:
$string = str_replace(br,\\n,$string);
i.e escape the escape character \\n
- Original Message -
From: Chad Day [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 06, 2001 4:38 PM
Subject: [PHP] addslashes problem ..
I have to use
11 matches
Mail list logo