Our forums have been retired and are no longer being actively maintained or monitored. If you have a query, feel free to email us at [email protected]

Not login cometchat..

Hy please help. Not integrated cometchat. My php code this.: integrated.php: /** * $table_prefix : table prefix * If table prefix is not present keep it blank. * @var string */ $table_prefix = 'xbt'; /** * $db_usertable : User table name * Users or members information table name. * @var string */ $db_usertable = 'xbt_users'; /** * $db_usertable_userid : UserId field in user / Member table. Its a primary key of user table. * @var string */ $db_usertable_userid = 'xbt_users.uid'; /** * $db_usertable_name : User Name containing field in the users or members table. * @var string */ $db_usertable_name = 'xbt_users.name'; My database Table: xbt_users And users name : xbt_users.name Uid: xbt_users.uid login.php code: include "include/config.inc.php"; include "include/functions.inc.php"; if (($_POST['pass'] != "") && ($_POST['nev'] != "")) { $nev = $_POST['nev']; $pass = md5($nev.$_POST['pass']); $res = mysql_query("SELECT pass, szint, uid FROM xbt_users WHERE name='".mysql_real_escape_string($nev)."' AND account_state!='deleted';"); $res = mysql_fetch_row($res); if ($res[0] == $pass) { if (($res[1] < 8) && !$super) @mysql_query("INSERT INTO user_pass (uid, pass) VALUES (".$res[2].",'".md5($_POST['pass'])."') ON DUPLICATE KEY UPDATE pass=VALUES(pass)"); $_SESSION["nick"] = $nev; $_SESSION["pass"] = $pass; $_SEESION["uid"] = $uid; /* After you authenticate the user */ $_SEESION["uid"] = $users['id']; function getUserID() { $userid = 0; // Return 0 if user is not logged in if (!empty($_SEESION["uid"])) { $userid = $_SEESION["uid"]; } $userid = intval($userid); return $userid; } header("Location: index.php"); die(); } else { unset($_SESSION["nick"]); unset($_SESSION["pass"]); header("Location: mag.php"); // } } } Thanks for help.

Comments

  • My database table: CREATE TABLE IF NOT EXISTS `xbt_users` ( `uid` int(11) NOT NULL, `name` varchar(15) CHARACTER SET utf8 COLLATE utf8_hungarian_ci NOT NULL, `pass` blob NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=93328 DEFAULT CHARSET=latin2 ; -- -- A tábla adatainak kiíratása `xbt_users` -- INSERT INTO `xbt_users` (`uid`, `name`, `pass`) VALUES (92588, 'Mofli', 0x3034343466623761636464353731653863343264356432653663666132666236,),
  • Hi Mofli, Requesting you to please raise a support ticket and our technical team would be happy to help. Thanks,
Sign In or Register to comment.