the following code when executed gives back an error stating that the query is empty.
[code=php]?php
include(‘db.php’);
if($_POST[‘btnSubmit’]) {
$accountCompany = $_POST[‘accountCompany’];
$accountWebsite = $_POST[‘accountWebsite’];
$accountGUID = md5(uniqid(1));
if($accountCompany != ” and $accountWebsite != ”) {
$sql = “INSERT INTO tblAccounts (accountCompany, accountWebsite, accountGUID) VALUES (‘” . $accountCompany .”‘,'” . $accountWebsite. “‘, ‘” . $accountGUID . “‘)”;
$result = mysql_query($query) or die(‘Error : ‘ . mysql_error());
//if (mysql_query($sql, $conn)){
header(“Location: accounts.php?new=true”);
//}
} else {
$err = true;
}
}
?>
i can’t figure it out