how can we register the varible into the session??

It is for static page, dynamic page, website, SEO, performance and other web development discussion
ramverma
Posts: 435
Joined: Sat Aug 23, 2014 5:34 pm
Contact:

how can we register the varible into the session??

Postby ramverma » Mon Oct 19, 2015 8:24 am

how can we register the varible into the session??


jeff2345
Posts: 49
Joined: Tue May 05, 2015 7:09 pm
Contact:

Re: how can we register the varible into the session??

Postby jeff2345 » Tue Oct 20, 2015 6:52 am

hello,

If you want to register a username as a session variable,

First way

session_start();
$username=$_GET['username'];
session_register('username');

Second Way

session_start();
$username=$_GET['username'];
$HTTP_SESSION_VARS['username']=$username;


Return to “PHP, HTML, MYSQL and Web Hosting”

Who is online

Users browsing this forum: No registered users and 0 guests