ok... my problem is this... when i click 'Send PM' it goes through like it should... but it doesn't insert into the database... any tips?
<?
//some code that you don't need to see.
if ($post) {
$note = htmlentities($note);
$note = nl2br($note);
$note = eregi_replace("<b>", "<b>", $note);
$note = eregi_replace("</b>", "</b>", $note);
$note = eregi_replace("<i>", "<i>", $note);
$note = eregi_replace("</i>", "</i>", $note);
$note = eregi_replace(" ", " ", $note);
$note = eregi_replace("­", "", $note);
$note = addslashes($note);
$time=time();
$datedate=date("n/j/Y h:i:s A");
$sql="SELECT * FROM users WHERE username='$uname'";
$result=mysql_query($sql);
$myrow=mysql_fetch_array($result);
$modname=$myrow["userid"];
$sql="UPDATE users SET notify=1 WHERE userid='$user'";
$result=mysql_query($sql);
$sql="INSERT INTO `pm` (`syssub`,`sysbod`,`sendto`,`sentat`,`sentfrom`,`read`,`sentsec`) VALUES ('$subject','$note','$user','$datedate','$uname','0','$time')";
$result=mysql_query($sql);
echo "<meta HTTP-EQUIV=\"refresh\" CONTENT=\"5; URL=../whois.php?user=$user";
if ($board) {echo "&board=$board"; }
if ($topic) {echo "&topic=$topic"; }
echo "\">
<tr><td align=center colspan=2>You should be returned to this user's Whois page automatically in five seconds. If not, you can click <a HREF=\"../boards/whois.php?user=$user";
if ($board) {echo "&board=$board"; }
if ($topic) {echo "&topic=$topic"; }
echo "\">here</a> to continue.</td></tr>
</table>";
include("../include/foot.php");
exit;
}
echo "<form action=\"pm.php?user=$user";
if ($board) {echo "&board=$board"; }
if ($topic) {echo "&topic=$topic"; }
echo "\" method=\"post\">
<tr><td>Subject:</td><td><textarea cols=\"60\" rows=\"1\" name=\"subject\" WRAP=\"virtual\"></textarea><br>
<tr><td>Message:</td><td><textarea cols=\"60\" rows=\"20\" name=\"note\" WRAP=\"virtual\"></textarea><br>
<TR><TD COLSPAN=2 ALIGN=CENTER><input type=\"submit\" name=\"post\" value=\"Send PM\"><input type=\"reset\" value=\"Reset\" name=\"reset\"></td></tr>
</td></tr>
</form>
</table>";
include("../include/foot.php");
?>