N
nukesheart
Guest
we're trying to configure cometchat for our upcoming website...
We only know HTML, no background at PHP at all, and then we need to configure some PHP codes here to get this great app to work.
it says here:
define('TABLE_PREFIX', '');
$userid = 0;
// Please update the following logic below to return the userid of the logged in user
// We assume you will be using some sort of session/cookie to fetch those details
// For example we use a cookie called sessionhash and store it in table called session
//
// Session table
// ---------------------------------
// useridsessionhash
// ---------------------------------
// 1afgbdsfbsdfklbnlern34
//
// Or you can use something as simple as $userid = $_SESSION['userid'];
$sql = ("select userid from ".TABLE_PREFIX."session where sessionhash = '".mysql_real_escape_string($_COOKIE['sessionhash'])."'");
$query = mysql_query($sql);
$session = mysql_fetch_array($query);
$userid = $session['userid'];
----------
ok ok..so what does these things mean?
Hoping to make things clear. Thanks. ^_^
ok...so...what do i do?
We only know HTML, no background at PHP at all, and then we need to configure some PHP codes here to get this great app to work.
it says here:
define('TABLE_PREFIX', '');
$userid = 0;
// Please update the following logic below to return the userid of the logged in user
// We assume you will be using some sort of session/cookie to fetch those details
// For example we use a cookie called sessionhash and store it in table called session
//
// Session table
// ---------------------------------
// useridsessionhash
// ---------------------------------
// 1afgbdsfbsdfklbnlern34
//
// Or you can use something as simple as $userid = $_SESSION['userid'];
$sql = ("select userid from ".TABLE_PREFIX."session where sessionhash = '".mysql_real_escape_string($_COOKIE['sessionhash'])."'");
$query = mysql_query($sql);
$session = mysql_fetch_array($query);
$userid = $session['userid'];
----------
ok ok..so what does these things mean?
Hoping to make things clear. Thanks. ^_^
ok...so...what do i do?