cluce Posted June 13, 2007 Share Posted June 13, 2007 can someone tell me if I have an error in my code because its not inserting my $_session['identity'] into the database. I know the session has a value because I am able to display it on the page. it just wont insert it into the database. //create and issue the first query $add_topic_sql = "INSERT INTO forum_topics (topic_title, topic_create_time, topic_owner) VALUES ('".$_POST["topic_title"]."', now(), '".$_SESSION['identity']."')"; $add_topic_res = mysqli_query($mysqli, $add_topic_sql) or die(mysqli_error($mysqli)); Link to comment https://forums.phpfreaks.com/topic/55466-solved-unable-to-insert-all-my-values-into-the-database/ Share on other sites More sharing options...
DJTim666 Posted June 13, 2007 Share Posted June 13, 2007 Are you 100% sure that the session id you are using is "identity" ??? Link to comment https://forums.phpfreaks.com/topic/55466-solved-unable-to-insert-all-my-values-into-the-database/#findComment-274118 Share on other sites More sharing options...
cluce Posted June 13, 2007 Author Share Posted June 13, 2007 yep because I can display it on the page like so.......<?php echo ($_SESSION['identity']); ?> I just cant insert it into the database. and I do have my colunm names in the table correct otherwise I would get an error which I dont get. Link to comment https://forums.phpfreaks.com/topic/55466-solved-unable-to-insert-all-my-values-into-the-database/#findComment-274124 Share on other sites More sharing options...
cluce Posted June 13, 2007 Author Share Posted June 13, 2007 I got it. Link to comment https://forums.phpfreaks.com/topic/55466-solved-unable-to-insert-all-my-values-into-the-database/#findComment-274162 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.