Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

PHP Sessions.

$
0
0

Hi, I'm currently trying to understand exactly how php sessions work? So far I've been told that you start a session with

  session_start()    
and then hold that data in a variable like
 $_SESSION['User_Id'];
but my problem is, is that I want it to hold the database user id so when the client logs in it keeps their session through their user_id. How would I execute this cause all the examples given to me look something like this:
session_start();
$_SESSION['name'] = 'John';

Viewing all articles
Browse latest Browse all 13200

Latest Images

Trending Articles



Latest Images