mattal999 Posted October 18, 2007 Share Posted October 18, 2007 $get = "INSERT INTO trips (id, username, tripname, date, story) VALUES (NULL, " . $username . ", " . $tripname . ", " . $date . ", " . $story . ")"; mysql_query($get); it doesn't work... Link to comment https://forums.phpfreaks.com/topic/73770-solved-this-isnt-working-mysql-insert/ Share on other sites More sharing options...
Barand Posted October 18, 2007 Share Posted October 18, 2007 string values must be quoted <?php $get = "INSERT INTO trips (id, username, tripname, date, story) VALUES (NULL, '$username', '$tripname', '$date', '$story')"; mysql_query($get); ?> Link to comment https://forums.phpfreaks.com/topic/73770-solved-this-isnt-working-mysql-insert/#findComment-372210 Share on other sites More sharing options...
mattal999 Posted October 18, 2007 Author Share Posted October 18, 2007 ok it works fine now thanks Link to comment https://forums.phpfreaks.com/topic/73770-solved-this-isnt-working-mysql-insert/#findComment-372215 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.