Shell PHP file writes to MySQL, but not if it has apostrophe
Posted: Wed Jan 17, 2007 2:36 am
Hey everyone,
I'm trying to set up a system that lets me post messages on my blog by email.
I have an email address set up so that any mail sent to it will be written into the blog's MySQL database (Subject -> message title | Body -> message body).
I have a line of code that emails a notification message to my email account just so I know the script has worked.
Everything works perfectly, as long as the message doesn't contain characters like apostrophies. If it does then nothing will be written into the MySQL, but I still get the notification email which shows the message as I sent it.
Using PHPMyAdmin to insert values works fine, no matter how long, and all the other scripts I have tried with my server haven't given me trouble - it seems to have something to do with the fact that the data from an email message.
This is the script that's giving trouble, with the login info removed of course:
http://www.evan.net.au/send_to_blog_web.txt
Thanks for your time,
Evan
I'm trying to set up a system that lets me post messages on my blog by email.
I have an email address set up so that any mail sent to it will be written into the blog's MySQL database (Subject -> message title | Body -> message body).
I have a line of code that emails a notification message to my email account just so I know the script has worked.
Everything works perfectly, as long as the message doesn't contain characters like apostrophies. If it does then nothing will be written into the MySQL, but I still get the notification email which shows the message as I sent it.
Using PHPMyAdmin to insert values works fine, no matter how long, and all the other scripts I have tried with my server haven't given me trouble - it seems to have something to do with the fact that the data from an email message.
This is the script that's giving trouble, with the login info removed of course:
http://www.evan.net.au/send_to_blog_web.txt
Thanks for your time,
Evan