PHP shows Question marks instead of quotes from Mysql
Posted: Sun Dec 07, 2003 12:27 pm
Heres the thing... i have an article database in which inside the main article field (text) has html code inside... I have it then get the information and display it on the page. The article shows fine, but for Single ' and double " quotes they are changed to question marks instead. Anyone know why?
Heres the basic overview of the code...
[Added PHP tags for eyecandy --JAM]
i tried print article... i tried stripslashes($article1);, addslashes($article1); and single and double quotes. Anyone know what the problem might be and how to fix it ? My email is info@asedesigns.com thanks.
Heres the basic overview of the code...
Code: Select all
<?php
$idthing = $_GET['row'];
$sql = "SELECT * FROM dakovarticlelist WHERE id = " . $idthing . " ";
$result = mysql_query($sql, $mydb);
$data = mysql_fetch_array($result);
$article1 = $data["article"];
$title1 = $data['title'];
$author1 = $data['author'];
$aboutauthor1 = $data['aboutauthor'];
$datewritten1 = $data['datewritten'];
$dateposted1 = $data['dateposted'];
$maincateogry1 = $data['maincategory'];
$subcategory1 = $data['subcategory'];
?>
more code here.....
then...
<?php echo $article1; ?>i tried print article... i tried stripslashes($article1);, addslashes($article1); and single and double quotes. Anyone know what the problem might be and how to fix it ? My email is info@asedesigns.com thanks.