This thread is based off a problem I had earlier this week…
I’m looking for a more practical strategy to enter articles into my MySQL database.
Currently all of my articles are .php files, and I tried cutting and pasting the body of each into the web form provided by phpMyAdmin, but it is complaining about single quotes/apostrophes?! And this is a real problem, because the body of my articles is Copy + HTML markup, so each is littered with HTML references to images and hyperlinks and thus tons of single and double quotes?!
What I am currently doing, is pasting the article body into a field called “body” and then using PHP to echo $body;
Here is a snippet of what the body of an article might look like…
<img src="../images/SmilingGirl.jpg" width="200"
alt="Picture: Smiling Girl. Credit: Lisa Miller."
title="Picture: Smiling Girl. Credit: Lisa Miller." />
<p>Last Saturday, students from the local college...</p>
What is the best way to handle data like this so that I can easily get it into MySQL and not have to spend a lifetime fixing things because phpMyAdmin and/or MySQL doesn’t like the original Text and HTML?!
Thanks,
Debbie