Can I store information, and use it in 2 or more php files?

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
IChaps
New php-forum User
New php-forum User
Posts: 115
Joined: Tue Mar 01, 2016 3:07 pm

Sun Mar 27, 2016 2:51 pm

Hello.

I'm just enquiring at this stage.
I'm looking to create a login screen.
I'd just like to know, once the log in is successful can I store the data in a variable created in login.php (for example),
and use it in another php file?

Thanks.

User avatar
hyper
php-forum Fan User
php-forum Fan User
Posts: 525
Joined: Mon Feb 22, 2016 5:52 pm

Sun Mar 27, 2016 4:03 pm

Yes you can, you can use Sessions, these are like cookies, but not stored client side.

Have a good look at them before using the first thing you come across.

IChaps
New php-forum User
New php-forum User
Posts: 115
Joined: Tue Mar 01, 2016 3:07 pm

Tue Mar 29, 2016 10:28 am

Hello hyper,

Thank you for your reply.

Post Reply