This post originally started out as "Why arent my links and text formatting being displayed propertly.
... but I had a quick though and when to check out what a " was in ascii . and what do u know .. it worked. so .. now this is a post to let anyone know who has the same prob
... that if you want to display " as a " then dont you it! do a char replace instead.
Simular to what i have below for the ' (i am escapaing it out) use this to change it to ascii:
$analysis = ereg_replace("\"",""",$analysis);
put that before your query into the database.
So.. original post is below for your amusement.
__________________________________________________
My form:
(input_article.php)
<div>
<input type="hidden" id="MyEditor" name="exec_sum" value="Enter ExecSum Here ">
<input type="hidden" id="MyEditor___Config" value="Key1=Value1&Key2=Value2&... (Key/Value:HTML encoded)">
<iframe id="MyEditor___Frame" src="editor/editor/fckeditor.html?InstanceName=MyEditor&Skin=Office2003&Toolbar=Default" width="100%" height="200" frameborder="no" scrolling="no"></iframe>
</div>
Inserting into the MSsql database:
(insert_article_reslults.php)
Replacing one special chars before the insert:
$analysis = ereg_replace("'","''",$analysis);
Actual query:
$query = "INSERT INTO main values ('$analysis');
an example of what $analysis equals:
'<p><a href=\"http://www.bob.com\">tihs is a test</a></p><p><a href=\"/masint/site/UserFiles/File/BMW_Quickstart_Guide.pdf\">browsing on the server</a></p>'
Editing the article and displaying what it looks like:
(edit_article.php)
http://www.stripe-man.com/problem.jpg
It seems it does this only for hyperlinks and font tags. I thikn it has to do with the quotes being used.
Sun, 04/10/2005 - 02:09
#1