Jump to content
MakeWebGames

Recommended Posts

Posted

I'm making a mafia game ¬_¬, and i get this error on the login page

- Deprecated: Function session_register() is deprecated in /home/therealh/public_html/index.php on line 105

Could anybody shed some light please?

Posted

session_register(), session_is_registered() and session_unregister() are dependent on register_globals. Register_globals were turned off starting in php4.2 in the year 2002. No new code should have been written after that point in time that used these functions. These functions have been removed in php6. Any code using them will stop working under php6 and must be changed to use the $_SESSION array variables.

Posted

Yeah but im confused

Could someone edit it quickly so i can understand a bit better please?

session_register('username');

$_SESSION['username'] = $inf->username;

Posted

is there no other way to get around it because i remove the session_register("something"); and have the $_SESSION['username'] = $inf->username; left and then when i log in i just get a white screen

Posted

<?php

session_start();

//some code

$_SESSION['username'] = $inf->username;

?>

I don't see why that wouldn't work...

? Make sure you have no syntax errors within the code

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...