Hi,
you use mysql_querey it should be mysql_query. Try to name the fields you want to insert instead of using (,value,,value).
It's easier to read if you don't use $_POST directly in the query but if you want to I'd suggest to do it this way:
$string = "INSERT INTO .... VALUES ('".$_POST['variable']."'");
Example:
//createsupuser.php
//Created By: Bill Lewis
include "./common_db.inc";
$strSuperusername = "";
$strSuperuserpass = "";
$strSuperuseremail = "";
$strSuperuseremp = "";
$strSuperuseralignment = "";
if(!isset($_POST['superusername']) || (($strSuperusername = $_POST['superusername']) == "")) {
error_message("Enter a UserName");
}
if(!isset($_POST['superuserpass']) || (($strSuperuserpass = $_POST['superuserpass']) == "")) {
error_message("Enter a UserPass");
}
if(!isset($_POST['superuseremail']) || (($strSuperuseremail = $_POST['superuseremail']) == "")) {
error_message("Enter a E-mail");
}
if(!isset($_POST['superuseremp']) || (($strSuperuseremp = $_POST['superuseremp']) == "")) {
error_messgae("Enter a Empire Name");
}
if(!isset($_POST['superuseralignment']) || (($strSuperuseralignment = $_POST['superuseralignment']) == "")) {
error_message("Enter a Alignment");
}
$link_id = db_connect();
$suquery = <<< EOSQL
INSERT INTO user (name,pass,email,date,whatever,emp,alignment)
VALUES ('$strSuperusername','$strSuperuserpass',
'$strSuperuseremail',curdate(),1,
'$strSuperuseremp','$strSuperuseralignment')
EOSQL;
$insert = mysql_query($suquery);
if(!$insert)
{
echo "We made a booboo in the querey! Error: ".mysql_error();
}
else
{
echo "YEY no booboo go check the db!";
}