Just nu i M3-nätverket
Jump to content



Recommended Posts

Jag förstår inte varför min query inte funkar. Är jag trött och blind eller vad missar jag??

$userid = $_SESSION['id'];
$newquestion = $_POST['newquestion']; 
$newanswer = $_POST['newanswer'];
$insertnewquestion = mysqli_query($conn,"INSERT INTO `table` (q_id, question, creator_id) VALUES ('id', '$newquestion', '$userid'") or die(mysqli_error($conn));


"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1"


Link to comment
Share on other sites


  • Create New...