Okay - for those who have not read my previous post, here is the issue.
I have a form with 3 fields
Author:
input type is text
Title
input type is text
Text
textarea - 50 cols 5 rows
the action calls a php file which stores those fields in my mysql database
<?php
// set your information.
$dbhost='localhost';
$dbusername='';
$dbuserpass='';
$dbname='';
// connect to the mysql database server.
mysql_connect ($dbhost, $dbusername, $dbuserpass);
if (!mysql_select_db($dbname)) die(mysql_error());
$article = nl2br("$article");
$author = htmlspecialchars($author);
$title = htmlspecialchars($title);
$article = htmlspecialchars($article);
$query1 = "INSERT INTO literature (date,author,title,article) VALUES (now(),'".$author."','".$title."','".$article."')";
mysql_query($query1)or die(mysql_error());
echo $author." has added ".$title." containing the text <br><br> ".$article;
?>
I am still playing with this file quite a bit, it needs alot of stripping work still (and the message will be formatted/worded better)
But at any rate; the $article is from the textarea field and stores things on multiple lines like so
This is some text
Now it has two lines
Lets get one more
And we will have four
I added the nl2br() to try and make those lines a single line with br's and it worked....kinda....
if I type in the same four line message and store it my database has
This is some text</ br>
Now it has two lines</ br>
Lets get one more</ br>
And we will have four
I need it to be stored like this...
This is some text</ br>Now it has two lines</ br>Lets get one more</ br>And we will have four
note: I removed the htmlspecialchars for this testing - it was screwing up the br's - should be able to easily fix that myself though. Thanks in advance for all your help - and thanks to thorpe for getting me this far!