Fatal Error Call To Undefined Function Session_register Xampp
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might fatal error call to undefined function session_register() in php have Meta Discuss the workings and policies of this site About fatal error: call to undefined function session_unregister() Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads call to undefined function session_is_registered() fix with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million session_is_registered() is deprecated programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Fatal error: Call to undefined function session_register() up vote 5 down vote favorite 1 session_register("username"); // session checker for pages $_SESSION['username']= $username; // storing username in session i am doing a php login system but when i click login
If Session_is_registered Myusername
system i go this error Fatal error: Call to undefined function session_register() in C:\xampp\htdocs\loginscript\auth_check.php on line 24 i am using php5.3 how can i solve this problems php mysql share|improve this question edited Dec 16 '13 at 20:25 Fred -ii- 69.4k93973 asked Dec 16 '13 at 19:53 brianc 51226 add a comment| 3 Answers 3 active oldest votes up vote 12 down vote This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0. Ref: http://www.php.net/manual/en/function.session-register.php Dont use session_register(), session_is_registered() and session_unregister() You can use $_SESSION[] instead of that Like as mentioned below: $_SESSION['username']= "Your value"; share|improve this answer edited Jun 16 at 10:34 answered Dec 16 '13 at 19:55 Krish R 16.4k42147 1 thanks for quick reply so how can i solve the problem. i am a beginner of php @user876345 thanks! –brianc Dec 16 '13 at 20:01 Remove that function and use $_SESSION[] –Krish R Dec 16 '13 at 20:04 add a comment| up vo
here for a quick overview of the site Help Center Detailed answers
Session_is_registered Not Working
to any questions you might have Meta Discuss the workings session_register w3schools and policies of this site About Us Learn more about Stack Overflow the company Business Learn session_register in php w3schools more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow http://stackoverflow.com/questions/20619704/fatal-error-call-to-undefined-function-session-register Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Call to undefined function session_register() [duplicate] up vote 5 down vote favorite This question already has an answer here: Fatal error: Call to undefined function http://stackoverflow.com/questions/16082420/call-to-undefined-function-session-register session_register() [duplicate] 2 answers Please help me everyone !! why i can't login , and this the error : *Fatal error: Call to undefined function session_register() in C:\xampp\htdocs**\proses1.php on line 27* this proses1.php code : "; exit; } $username = stripslashes($username); $password = stripslashes($password); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $sql="SELECT login.username, login.password, login.status FROM login WHERE login.username='$username' AND login.password='$password'"; $result=mysql_query($sql) or die(mysql_error()); $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row $r=mysql_fetch_array($result); session_start(); session_register("username"); session_register("password"); session_register("status"); //session_register("nojual"); $_SESSION['username']=$r[username]; $_SESSION['password']=$r[password]; $_SESSION['status']=$r[status]; //$_SESSION['nojual']=$r[nojual]; //$_SESSION['nojual']=$r[nojual]; if ($_SESSION['status']=='dokter') // ini untuk admin { header("location:home_dokter.php"); }else if($_SESSION['status']=='apotik'){ header("location:uji.php"); }else if($_SESSION['status']=='bagian persediaan'){ header("location:obat.php"); }else{ print "scriptalert('anda salah login!'); javascript:history.go(-1);"; exit; } ?> php mysql login share|improve this question edited Apr 18 '13 at 13:55 afuzzyllama 4,77442854 asked Apr 18 '13 at 12:
Hello, Noob alert!! I tried to protect some pages with a code I found googling. https://www.daniweb.com/programming/web-development/threads/464412/fatal-error-call-to-undefined-function-session-is-registered But since my server was recently moved to a better one, the code stoped working and gives me the error "Fatal error: Call http://www.dreamincode.net/forums/topic/330196-call-to-undefined-function/ to undefined function session_is_registered() .../protect_page.php on line 3" I googled it, and I think it's happening because of the version of PHP. I call to tried to fix it, but no joy! I would appreciate if you could help me! I will paste here the code I have. the code I got on every page I wish to protect include('protect_page.php')?> login.php