I currently have a news form that submits to 4 different areas of the site (dev, site, sl and announcements).
In my process form it goes to the database as :
if(isset($_POST['submitNews1'])){
$Title = mysql_real_escape_string($_POST['Title']);
$Message = mysql_real_escape_string($_POST['Message']);
$Category = mysql_real_escape_string($_POST['Category']);
$User = mysql_real_escape_string($_POST['User']);
$query = "INSERT INTO News (Date, Title, Message, Category, User) values(now(), '$Title' ,'$Message', '$Category', '$User')";
$result = @mysql_query ($query); // Run the query.
if ($result) { // If it ran OK.
echo "$message_News1";
}
mysql_close();
}
I display it as:
<?php
$result = mysql_query("SELECT *, DATE_FORMAT(Date, '%M %D, %Y @ %r') AS Date FROM News WHERE Category='Development' ORDER BY ID DESC Limit 0,5");
echo mysql_error();
if (mysql_num_rows($result))
while($row = mysql_fetch_array($result)) {
$Message= nl2br($row["Message"]);
?>
<table width="100%" border="0" cellspacing="5" cellpadding="5" class="news">
<tr><td align="center" class="newsH1">-- <?PHP echo $row['Title']; ?> --</td></tr>
<tr><td align="center" class="citation">Posted by: <?PHP echo $row['User']; ?> on <?PHP echo $row['Date']; ?></td></tr>
<tr><td valign="center"> </td></tr>
<tr><td align="left">
<?PHP echo $row['Message']; ?>
</td></tr>
</table>
<br/>
<?php
}
?>
All articles are going into the database as "I\m working on this!".
All articles when being displayed return as "I\m working on this!" instead of "I'm working on this". I can't figure out the problem as it just started doing this today. Up until then it worked fine.