Jump to content

Recommended Posts

$mapname = $_POST['name'];
$cat = $_POST['category'];
$readme = $_POST['readme'];
$author = $_POST['author'];
$authorlink = $_POST['authorlink'];
$release = $_POST['release'];
$version = $_POST['version'];
$filesize = $_POST['filesize']; 
$players = $_POST['players'];
$timeofday = $_POST['timeofday'];
$textures = $_POST['textures'];
$weapons = $_POST['weapons'];
$theme = $_POST['theme'];
$environment = $_POST['environment'];
$download = $_POST['download'];
$youtube = $_POST['youtube'];
$img = $_POST['img'];
$img1 = $_POST['img1'];
$img2 = $_POST['img2'];
$img3 = $_POST['img3'];
$readme = nl2br(strip_tags($_POST['readme'],"<b><a><i><u><font color>"));

$sql = "INSERT into maps (cat,name,author,readme,release,filesize,players,timeofday,textures,weapons,authorlink,img,img1,img2,img3,version,environment,theme,download,youtube) VALUES('cat','$name','$author','$readme','$release','$filesize','$players','$timeofday','$textures','$weapons','$authorlink','$img','$img1','$img2','$img3','$version','$environment','$theme','$download','$youtube')";
$addmaps = mysql_query($sql)
or die(mysql_error());
echo ("<meta http-equiv=\"Refresh\" content=\"1; URL=\"/>Map added successfully! You will now be redirected");

 

I have been searching and trying to figure out what could be wrong but i just can't someone please help.

 

 

I get this 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 'release,filesize,players,timeofday,textures,weapons,authorlink,img,img1,img2,img' at line 1

 

I'm using mysql 5.0

Link to comment
https://forums.phpfreaks.com/topic/128073-solved-help-sql-syntax-error/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.