[PHP] addSlashes problem....5 lines code

2004-01-11 Thread Ryan A
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'];

Re: [PHP] addSlashes problem....5 lines code

2004-01-11 Thread Jason Wong
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'])) {

Re: [PHP] addSlashes problem....5 lines code

2004-01-11 Thread Ryan A
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

Re: [PHP] addSlashes problem....5 lines code

2004-01-11 Thread Jason Wong
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

[PHP] Addslashes problem (MSSQL)

2003-03-20 Thread Poon, Kelvin (Infomart)
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);

Re: [PHP] Addslashes problem (MSSQL)

2003-03-20 Thread Lowell Allen
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

RE: [PHP] Addslashes problem (MSSQL)

2003-03-20 Thread Poon, Kelvin (Infomart)
, 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

RE: [PHP] Addslashes problem (MSSQL)[Scanned]

2003-03-20 Thread Michael Egan
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

Re: [PHP] Addslashes problem (MSSQL)

2003-03-20 Thread Lowell Allen
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

[PHP] addslashes problem ..

2001-07-06 Thread Chad Day
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

Re: [PHP] addslashes problem ..

2001-07-06 Thread Adrian Murphy
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