Jump to content

Help with inserting into Database.


madjack87

Recommended Posts

In your $sql variable, you have single quotes before and after the first and last VALUES variables, but only after the second...

 

Try...

 

<?php
$sql="INSERT INTO events (bar, date, event)
VALUES
('$_POST[barname]','$_POST[date]','$_POST[event]')";
?>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.