here is my code
- Code: Select all
if(!$_USER['uid'] >= 2){
echo'<CENTER><FONT SIZE="4"><Br><Br>You must first login to use this feature
</FONT>';
exit;
}
if($submit){
echo $_USER['username'] . " Your memo is being sent to $to";
$A = "INSERT INTO gl_memo(from,msg) VALUES ('$_USER[username]','$HTTP_POST_VARS[msg]')";
$result = DB_query($A);
}else{
?>
<TABLE WIDTH=55% ALIGN="center"><TR ALIGN="left"><TD ALIGN="left">
<FORM METHOD="post" ACTION="<?PHP echo $PHP_SELF ?>">
<br><Br>
Send Memo To:<Br>
<INPUT TYPE="text" NAME="to"><Br>
<TEXTAREA cols="55" rows="15" NAME="msg">
</TEXTAREA><br>
<INPUT TYPE="submit" NAME="submit" value="submit memo">
</TD></TR></FORM></TABLE>
<?php
}
?>
then i get this..
xlordt Your memo is being sent to grayman1064: You have an error in your SQL syntax near 'from,msg) VALUES ('xlordt','')' at line 1


