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)); Quote Link to comment 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" ??? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
cluce Posted June 13, 2007 Author Share Posted June 13, 2007 I got it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.