Hi
I am using the php to inserting the records in mysql table. My table has following feilds
id int auto increament
data longtext
via php i am inserting the record
$data = isset($_REQUEST['data'])?$_REQUEST['data']:"";
if (isset($_REQUEST['submit']))
{
$data=htmlentities(mysql_real_escape_string($data));
$query=mysql_query(insert into special values($data));
}
and when I echo this record after retrieving from table its shows me in Single Line whatever user input in multiple lines or in a paragraph with some special characters also.
$result1=mysql_query("select * from special");
if (mysql_num_rows($result1)){
while($row=mysql_fetch_array($result1)){
$str=$row['data'];
$str=html_entity_decode(stripslashes($str));
echo "<textarea>".$str."</textarea>";
}
}
I want to show in a original data whats the user actually insert.Can any body help me in this matter.
Thanks