PhpxZ Posted June 30, 2010 Share Posted June 30, 2010 The line: if (mysql_query('INSERT INTO `chars` (`accid`,`charname`,`sex`,`age`,`pgmg`,`dmrktt`,`history`,`carcrashrp`,`carscrash`) VALUES ('. $_SESSION['Logged'] .',\''. $_POST['charname'] .',\''.$_POST['sex'] .',\''. $_POST['age'] .',\''. $_POST['pgmg'] .'\',\''. $_POST['dmrktt']. '\',\''. $_POST['history'] .'\',\''. $_POST['carcrashrp'] .'\',\''. $_POST['carscrash'] .'\')', $con)) I have the rows in the mysql.. but i still get error.. the error is: 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 Link to comment https://forums.phpfreaks.com/topic/206336-get-error-in-mysql-update-line/ Share on other sites More sharing options...
marcus Posted June 30, 2010 Share Posted June 30, 2010 <?php $sql = "INSERT INTO `chars` (`accid`,`charname`,`sex`,`age`,`pgmg`,`dmrkt`,`history`,`carcrashrp`,`carscrach`) VALUES('".$_SESSION['Logged']."','".$_POST['charname']."','".$_POST['sex']."','".$_POST['age']."','".$_POST['pgmg']."','".$_POST['dmrktt']."','".$_POST['history']."','".$_POST['carcrashrp']."','".$_POST['carscrash']."')"; $res = mysql_query($sql) or die(mysql_error()); ?> Link to comment https://forums.phpfreaks.com/topic/206336-get-error-in-mysql-update-line/#findComment-1079391 Share on other sites More sharing options...
PhpxZ Posted June 30, 2010 Author Share Posted June 30, 2010 But this need to be in if.. couse i need to use it after Link to comment https://forums.phpfreaks.com/topic/206336-get-error-in-mysql-update-line/#findComment-1079399 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.