php - change a session to an email session -
this session username, , want make session email, tryd soo try, doesnt work. can me make new session email
<?php session_start(); header('content-type: text/html;charset=utf-8'); if(!isset ($_session['username']) , isset($_cookie['username'], $_cookie['password'])) { $cnn = mysql_query('select password,id users username="'.mysql_real_escape_string($_cookie['username']).'"'); $dn_cnn = mysql_fetch_array($cnn); if(sha1($dn_cnn['password'])==$_cookie['password'] , mysql_num_rows($cnn)>0) { $_session['username'] = $_cookie['username']; $_session['userid'] = $dn_cnn['id']; } } ?> <?php echo htmlentities($_session['username']); ?>
**
yes!
session_start(); header('content-type: text/html;charset=utf-8'); if(!isset($_session['username']) , isset($_cookie['username'], $_cookie ['email'])) { $cnn = mysql_query('select email, users username="'.mysql_real_escape_string($_cookie['username']).'"'); $dn_cnn = mysql_fetch_array($cnn); if(sha1($dn_cnn['email'])==$_cookie['email'] , mysql_num_rows($cnn)>0) { $_session['username'] = $_cookie['username']; $_session['userid'] = $dn_cnn['email']; } } ?> <?php echo htmlentities($_session['userid']); ?>
now id 1 :( dont want id :p **
Comments
Post a Comment