but i am getting a sytax error i just dont see the problem can any one help please here is the code
Code: Select all
<?
$host = "localhost";
$username = "localhost";
$password = "abc123";
$database = "contacts";
$db = mysql_connect($host, $username, $password);
mysql_select_db($database);
$BusinessName = (isset($_POST['BusinessName']));
$Slogan = addslashes(isset($_POST['Slogan']));
$Business_Address = addslashes (isset($_POST['Business_Address']));
$Tel = addslashes(isset($_POST['Tel']));
$Website = addslashes(isset($_POST['Website']));
$Email = addslashes(isset($_POST['Email']));
$Member_Status = addslashes(isset($_POST['Member_Status']));
$Fax =addslashes(isset($_POST['Fax']));
$type = addslashes(isset($_POST['type']));
$make = addslashes(isset($_POST['make']));
$Categories = addslashes(isset($_POST['Categories']));
$Keyword = addslashes (isset($_POST['Keyword']));
$Picture1 = addslashes (isset($_POST['Picture1']));
$Headline = addslashes (isset($_POST['Headline']));
$Slogan2 = addslashes (isset($_POST['Slogan2']));
$Description1 = addslashes (isset($_POST['Description1']));
$Description2 = addslashes (isset($_POST['Description2']));
$Description3= addslashes (isset($_POST['Description3']));
$Contact2 = addslashes (isset($_POST['Contact2']));
$Picture2 = addslashes (isset($_POST['Picture2']));
$Picture3 = addslashes (isset($_POST['Picture3']));
$Picture4 = addslashes (isset($_POST['Picture4']));
$User_Name = addslashes (isset($_POST['User_Name']));
$Password = addslashes (isset($_POST['Password']));
$User_Name = mysql_query("SELECT `Password` FROM `Business_Info` WHERE `User_Name` == '$User_Name'");
if($Password == $Password[0])
{
$sql= " UPDATE WHERE `Business_Info`(`BusinessName`,`Slogan`,`Business_Address`,`Tel`,`Website`,`Email`,`Member_Status`,` Fax`,`type`,`make`,`Categories`,`Keyword`,`picture1`,`Headline`,`Slogan2`,`Description1`,`Description2`,`Description3`,`Contact2`,`Picture2`,`Picture3`,`Picture4`,`Password`)
Values('.$BusinessName.','.$Slogan.','.$Business_Address.','.$Tel.','.$Website.','.$Email.','.$Member_Status.','.$Fax.','
.$type.','.$make.','.$Categories.','.$Keyword.','.$Picture1.','.$Headline.','.$Slogan2.','.$Description1.',
'.$Description2.','.$Description3.','.$Contact2.'
,'.$Picture2.','.$Picture3.','.$Picture4.','.$Password.') WHERE `User_Name` == $User_Name";
$result = mysql_query($sql);
echo mysql_error();
}
else
{
echo "Incorrect Password or User Name Try again ";
exit;
}
?>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `Business_Info`(`BusinessName`,`Slogan`,`Business_Address`