jwgrafflin
03-25-2008, 09:15 PM
I keep getting the same error:
Unable to update dataYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ssl='O',ecommerce='O',reseller='-',dedicated='-',vps='x',affiliate='CJ',green='-' at line 1
This code works just fine on another site, and all the other php pages work just fine. But this one is driving me nuts trying to figure out the problem.
<?php
$hostname=$_POST['hostname'];
$url=$_POST['url'];
$established=$_POST['established'];
$price=$_POST['price'];
$diskspace=$_POST['diskspace'];
$bandwidth=$_POST['bandwidth'];
$econplan=$_POST['econplan'];
$maillists=$_POST['maillists'];
$platform=$_POST['platform'];
$ssl=$_POST['ssl'];
$ecommerce=$_POST['ecommerce'];
$reseller=$_POST['reseller'];
$dedicated=$_POST['dedicated'];
$vps=$_POST['vps'];
$affiliate=$_POST['affiliate'];
$green=$_POST['green'];
$au=$_POST['au'];
$ca=$_POST['ca'];
$uk=$_POST['uk'];
$notes=$_POST['notes'];
include("dbinfo.inc.php");
$query="UPDATE webhosts SET hostname='$hostname',url='$url',established='$esta blished',price='$price',diskspace='$diskspace',ban dwidth='$bandwidth',econplan='$econplan',maillists ='$maillists',platform='$platform',ssl='$ssl',ecom merce='$ecommerce',reseller='$reseller',dedicated= '$dedicated',vps='$vps',affiliate='$affiliate',gre en='$green',au='$au',ca='$ca',uk='$uk',notes='$not es' WHERE hostname='$hostname'";
@mysql_select_db($database) or die( "Unable to select database" . mysql_error());
mysql_query($query) or die("Unable to update data" . mysql_error());
echo "<center><table><tr><td>";
echo "<h2>Record Updated</h2>";
echo "</td></tr></table></center>";
mysql_close();
?>
Unable to update dataYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ssl='O',ecommerce='O',reseller='-',dedicated='-',vps='x',affiliate='CJ',green='-' at line 1
This code works just fine on another site, and all the other php pages work just fine. But this one is driving me nuts trying to figure out the problem.
<?php
$hostname=$_POST['hostname'];
$url=$_POST['url'];
$established=$_POST['established'];
$price=$_POST['price'];
$diskspace=$_POST['diskspace'];
$bandwidth=$_POST['bandwidth'];
$econplan=$_POST['econplan'];
$maillists=$_POST['maillists'];
$platform=$_POST['platform'];
$ssl=$_POST['ssl'];
$ecommerce=$_POST['ecommerce'];
$reseller=$_POST['reseller'];
$dedicated=$_POST['dedicated'];
$vps=$_POST['vps'];
$affiliate=$_POST['affiliate'];
$green=$_POST['green'];
$au=$_POST['au'];
$ca=$_POST['ca'];
$uk=$_POST['uk'];
$notes=$_POST['notes'];
include("dbinfo.inc.php");
$query="UPDATE webhosts SET hostname='$hostname',url='$url',established='$esta blished',price='$price',diskspace='$diskspace',ban dwidth='$bandwidth',econplan='$econplan',maillists ='$maillists',platform='$platform',ssl='$ssl',ecom merce='$ecommerce',reseller='$reseller',dedicated= '$dedicated',vps='$vps',affiliate='$affiliate',gre en='$green',au='$au',ca='$ca',uk='$uk',notes='$not es' WHERE hostname='$hostname'";
@mysql_select_db($database) or die( "Unable to select database" . mysql_error());
mysql_query($query) or die("Unable to update data" . mysql_error());
echo "<center><table><tr><td>";
echo "<h2>Record Updated</h2>";
echo "</td></tr></table></center>";
mysql_close();
?>