About Storing Sesion in MySQL database

21-May-2015 06:01:59

Sir i want to store the session in mysql database which is on Linux apache server please help me...

21-May-2015 18:16:56

When a user loged in successful, the plugin will create an array ($_SESSION[“userprofile”]) to store user data. You can use:

<?php

print_r($_SESSION[“userprofile”]);

?>

to see all info in the SESSION than you can choose which will be insterted into your database.

Example: When a user log in by Facebook account, we will get data:

$_SESSION[“userprofile”]['id']

$_SESSION[“userprofile”]['email']

$_SESSION[“userprofile”]['first_name']

$_SESSION[“userprofile”]['gender']

$_SESSION[“userprofile”]['last_name']

$_SESSION[“userprofile”]['link']

$_SESSION[“userprofile”]['locale']

$_SESSION[“userprofile”]['name']

$_SESSION[“userprofile”]['timezone']

$_SESSION[“userprofile”]['updated_time']

$_SESSION[“userprofile”]['verified']

If user log in by other social account the data you get may have different structure and names, you need to use "print_r" to see its structure before determining which info to insert.

Regards.