Jump to content

[SOLVED] unable to insert all my values into the database


cluce

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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