[PHP] HTML in database

2007-07-04 Thread Bruce Cowin
I am writing code to store a bunch of email files, in MIME format, into a database. The body of some of these emails, but not all, are in HTML format. If I use addslashes (after checking get_magic_quotes_gpc()), the database record won't get saved. There's no error message, just no record

Re: [PHP] HTML in database

2007-07-04 Thread Chris
Bruce Cowin wrote: I am writing code to store a bunch of email files, in MIME format, into a database. The body of some of these emails, but not all, are in HTML format. If I use addslashes (after checking get_magic_quotes_gpc()), the database record won't get saved. There's no error

Re: [PHP] HTML in database

2007-07-04 Thread Bruce Cowin
Thanks. Sorry, I should have mentioned I'm using MS Sql Server and I don't see a mssql equivalent to that function. Regards, Bruce Chris [EMAIL PROTECTED] 5/07/2007 12:10:17 p.m. Bruce Cowin wrote: I am writing code to store a bunch of email files, in MIME format, into a database. The

Re[2]: [PHP] HTML in database

2007-07-04 Thread Richard Davey
Hi Bruce, Thursday, July 5, 2007, 1:26:01 AM, you wrote: Thanks. Sorry, I should have mentioned I'm using MS Sql Server and I don't see a mssql equivalent to that function. MSSQL treats '' as an escaped ', not \' like MySQL does. So you can't addslashes it. Perform your own ' to ''

Re[3]: [PHP] HTML in database

2007-07-04 Thread Richard Davey
Thanks. Sorry, I should have mentioned I'm using MS Sql Server and I don't see a mssql equivalent to that function. MSSQL treats '' as an escaped ', not \' like MySQL does. So you can't addslashes it. Perform your own ' to '' conversion. And to reply to my own reply :) ... If you can, use

Re: [PHP] HTML in database

2007-07-04 Thread Chris
Bruce Cowin wrote: Thanks. Sorry, I should have mentioned I'm using MS Sql Server and I don't see a mssql equivalent to that function. Ahh - sorry, missed that in your original post. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/)

Re: Re[3]: [PHP] HTML in database

2007-07-04 Thread Bruce Cowin
Oh, thanks very much. I didn't know about PDO before. I wish I had before I had written my own db class! :-) Thanks again and I'll try it out. Regards, Bruce Richard Davey [EMAIL PROTECTED] 5/07/2007 12:38:02 p.m. Thanks. Sorry, I should have mentioned I'm using MS Sql Server and I

Re: [PHP] HTML in database

2007-07-04 Thread Bruce Cowin
Me too. :-) I appreciated your quick response, though. Regards, Bruce Chris [EMAIL PROTECTED] 5/07/2007 1:14:58 p.m. Bruce Cowin wrote: Thanks. Sorry, I should have mentioned I'm using MS Sql Server and I don't see a mssql equivalent to that function. Ahh - sorry, missed that in your

Re: Re[2]: [PHP] HTML in database

2007-07-04 Thread Bruce Cowin
I was still having the same problems even with PDO, but doing my own replace: $body = str_replace(', \, $body); fixed the problem. Thanks again! Regards, Bruce Richard Davey [EMAIL PROTECTED] 5/07/2007 12:34:29 p.m. Hi Bruce, Thursday, July 5, 2007, 1:26:01 AM, you wrote: Thanks.