Hi,
I have want to insert session variable in my database. I have developed a blog and I want to insert session variable in one of the fields defined in my database. I have the code which can insert other fields in the database but I do not know how to insert the session variable.
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form")) {
$insertSQL = sprintf("INSERT INTO blog (title, specialization, message, time, email) VALUES (%s, %s, %s, %s , %s, %s)",
GetSQLValueString($_POST['title'], "text"),
GetSQLValueString($_POST['specialization'], "text"),
GetSQLValueString($_POST['words'], "text"));
In the table I have the following fields:
blog_id, title, message, time, email.
Email in the last will be taken from the session variable. Can any one please help me and tell me the code which can take an email from session and put it in the database.
Regards,
Bilal A. Khan