Welcome to Server Circle. It's a friendly site and all levels of experience are welcome. Be aware that we use cookies for your login.
Server Circle - Ask questions about Servers and get answers from experts.
Beta (0.33 sec)
In PHP session_register no longer exists and is deprecated

I've been using session_register for ages and didn't think register_globals, since that was switched off, would affect it.

What's the safe alternative ? Thanks.
Asked by:
JackFlash
378 points
 Report Abuse
 Share Page - Category: Programming - Tags: In PHP session_register no longer exists and is deprecated
 Enter your response
Please use Pastie.org to paste lengthy code or to fix formatting issues with code
  • Responses in reverse (1)

Best Answer

I'm willing to be corrected but I think that if you just do this without using session_register then it should be pretty safe:

session_regenerate_id();

$_SESSION['loginid']=$var['3'];

$_SESSION['name']=$var['0'];

session_write_close();

Response by:
Trinity
2782 points


  • Related Questions
About Us : Contact Us : Etiquette : Terms : CDN Failover : ShorterURL : CDN Fallback : © 2013 Server Circle