Hi,
I have a simple HTML page where I input some text. Here's the code:
<form action="mysqlconnect.php" method="post">
<h2>Content:</h2><textarea name="content" rows="20" cols="50" wrap="virtual"></textarea>
<input type="submit" name="submit" value="Submit" />
When I click on Submit, I get to the mysqlconnect.php page where I connect to my database and issue the following query:
$add = "insert into Item values ('', '$_POST[content]', now())";
mysql_query($add, $conn) or die(mysql_error());
So, the text I typed in on the HTML page is saved in my database.
Later, when I connect to the database to retrieve the text, everything works fine, except I lost the format of the text. In other words, all I get back is just one long string without any formatting (no separate paragraphs).
Please help.
Thank you.
Mike