<html>
<head><title>Write a New Article</title></head>
<body>
<?php
session_start();
$connect=mysql_connect("localhost", "worldofp_mussy", "mustafa");
mysql_select_db("worldofp_blog1")
or die(mysql_error());
$get="SELECT user_id, user_name
FROM user
WHERE user_name = '" . $_SESSION['username'] . "'
ORDER BY user_id";
$results=mysql_query($get)
or die(mysql_error());
$row=mysql_fetch_array($results);
$insert="INSERT INTO article( article_name, article_content,
user)
[B]VALUES
( '<h4>" . $_POST['articlename'] . "</h4>',
'<pre>". $_POST['articlecontent'] ."</pre>',
'" . $row['user_id'] . "')";[/B]
$results=mysql_query($insert)
or die(mysql_error());
echo "Congratulations you have successfully entered the article.";
echo "Please click the following link to continue: <br />";
echo "<a href='index.php?log=1' title='Home Page'>continue</a>";
?>
</body>
</html>
hey guys, i have come to a dead end now. when i display the article the content exceeds the width of the div element. how do i tell the form to produce a new line when ever the the user goes on a new line in the text box form?
i have bolded the part where i am telling the program to produce the article content in a pre code.
an example is in the link
http://www.worldofpakistan.net/blog1/displayart.php?art=1&&log=0
the width of the div should be 500 px, and the corners are supposed to be rounded.