Spacetech
01-04-2006, 03:29 AM
When I use this code, I get
MYSQL ERROR: 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 'replace) VALUES ('','[b]','')' at line 1
The Code is
$code = $_POST['code'];
$replace = $_POST['replace'];
mysql_query("INSERT INTO codes (id,code,replace) VALUES('','$code','$replace')") or die('<br>MYSQL ERROR: ' . mysql_error());
and the table is setup like
CREATE TABLE `codes` (
`id` INT(4) NOT NULL AUTO_INCREMENT ,
`code` VARCHAR(225) NOT NULL ,
`replace` VARCHAR(225) NOT NULL ,
PRIMARY KEY (`id`) );
Please help :confused:
MYSQL ERROR: 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 'replace) VALUES ('','[b]','')' at line 1
The Code is
$code = $_POST['code'];
$replace = $_POST['replace'];
mysql_query("INSERT INTO codes (id,code,replace) VALUES('','$code','$replace')") or die('<br>MYSQL ERROR: ' . mysql_error());
and the table is setup like
CREATE TABLE `codes` (
`id` INT(4) NOT NULL AUTO_INCREMENT ,
`code` VARCHAR(225) NOT NULL ,
`replace` VARCHAR(225) NOT NULL ,
PRIMARY KEY (`id`) );
Please help :confused: