Ever sense I formatted and install PHP, Mysql, Apache this script no longer works.
It gives no errors, it just does not do anything, take a look mabye i screwed something up
PHP Code:<?php
$date = date("D,M,Y");
if ($submit) {
$body = str_replace("\r\n|\n|\r", "<br>", "$body");
$body = str_replace("[q]", "<blockquote><font class=quote>","$body");
$body = str_replace("[/q]", "</blockquote></font>","$body");
// process form
$db = mysql_connect("localhost", "root");
mysql_select_db("site",$db);
$sql = "INSERT INTO news (title,date,user,source,body) VALUES
('$title','$date','$user','$source','$body')";
$result = mysql_query($sql);
echo "Thank you! Information entered.\n";
} else{
// display form
?>
<form method="post" action="<?php echo $PHP_SELF?>">
Title:<input type="Text" name="title"><br><br>
UserName:<input type="Text" name="user"><br><br>
Source:<input type="Text" name="source"><br><br>
<textarea name="body" rows="20" cols="80" wrap="physical">
</textarea>
<P>
<input type="Submit" name="submit" value="Enter information">
</form>
<?php
} // end if
?>
