Hello Guys
I need a bit of help with my PHP and Database query....
ok this is what i have....
if(($_POST['Update'] == "Update Contact Info")) {
$business=$_POST['businessname'];
$contact=$_POST['contactname'];
$tel=$_POST['tel'];
$cell=$_POST['cell'];
$fax=$_POST['fax'];
$web=mysql_real_escape_string($_POST['web']);
if (!get_magic_quotes_gpc()) {
$business=addslashes($_POST['businessname']);
$contact=addslashes($_POST['contactname']);
$tel=addslashes($_POST['tel']);
$cell=addslashes($_POST['cell']);
$fax=addslashes($_POST['fax']);
$web=addslashes($_POST['web']);
}
if ( strlen($business) > 0 ) {
if ( strlen($business) > 0 ) {
$querycontact=("update companies set cell='$cell', tel='$tel', fax='$fax, webaddress='$web', name='$business', contact='$contact' where username='$user' and token='$token' and profile='$profile';");
echo $querycontact;
mysql_query($querycontact);
$error2="Your Contact Info have been updated!";
} else { $error2 = "Please enter a Contact Person name"; }
} else { $error2 = "Please enter a Business Name"; }
}
and when i enter info into my form and send it this is the query....
update companies set cell='+27 * 3835', tel='+27', fax='+27, webaddress='Http://www.site.co.za', name='Alpha', contact='Johan Kotze' where username='alpha' and token='a63ba67e724408a578ace5ba8f589028' and profile='event';
when i execute the query in mysqladmin this is what it response with:
Error
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem
ERROR: Unknown Punctuation String @ 82
STR: ://
SQL: update companies set cell='+27 * 3835', tel='+27', fax='+27, webaddress='Http://www.site.co.za', name='Alpha', contact='Johan Kotze' where username='alpha' and token='a63ba67e724408a578ace5ba8f589028' and profile='event';
SQL query:
update companies set cell='+27 * 3835', tel='+27', fax='+27, webaddress='Http://www.site.co.za', name='Alpha', contact='Johan Kotze' where username='alpha' and token='a63ba67e724408a578ace5ba8f589028' and profile='event';
MySQL said: Documentation
#1064 - 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 'Http://www.site.co.za', name='Alpha', contact='Johan Kotze' ' at line 1
Any one can maybe help me to correct this?