Log in

View Full Version : Correct variables?


Daniel
03-17-2006, 01:16 AM
I'm using this code in my acp directory, and when ever I submit my form I get the error message I listed below, but I'm not sure why. Is it because I'm not using the correct variables for vB? Any help is greatly appreciated :D
<?php
$body = $_POST["body"];

require_once('./global.php');

$sql_pass_get = "SELECT * FROM user WHERE username";

if('username' == "" OR $body == ""){
echo "Error. You cannot enter a blank message or name!";
exit;
} else {}

mysql_query("INSERT INTO `staffchat` ( `username` , `body` ) VALUES ( 'username', '$body' )")
or die ("Please do not flood the server. Try again in a minute or so, press BACK on your browser.");

header("Location: staffchat.php");

?>