Call To Undefined Function Session_register Error In Php
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might php register session variable have Meta Discuss the workings and policies of this site About
Html Sessions
Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting session_is_registered() is deprecated ads 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 fatal error: call to undefined function session_unregister() million 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 4 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
Call To Undefined Function Session_is_registered() Fix
login 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.3k93973 asked Dec 16 '13 at 19:53 brianc 46226 add a comment| 3 Answers 3 active oldest votes up vote 11 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.3k42147 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 com
here for a quick overview of the site Help Center Detailed answers to any fatal error call to undefined function session_register() in xampp questions you might have Meta Discuss the workings and policies of session_register w3schools this site About Us Learn more about Stack Overflow the company Business Learn more about hiring
Session_register In Php W3schools
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is http://stackoverflow.com/questions/20619704/fatal-error-call-to-undefined-function-session-register 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 session_register() [duplicate] 2 answers Please help http://stackoverflow.com/questions/16082420/call-to-undefined-function-session-register 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,77342854 asked Apr 18 '13 at 12:02 Alver 741110 marked as duplicate by Shoe, Tomasz Kowalczyk, IronMan84, Dan Espa
to undefined function session_is_registered() Donate $1 now to see this question answered quickly Sponsored questions offer a monetary incentive to answerers to produce quality responses. Be intelligently matched with 5 https://www.daniweb.com/programming/web-development/threads/464412/fatal-error-call-to-undefined-function-session-is-registered likely answerers who will be alerted to help. 4Contributors 6Replies 21Views 3 YearsDiscussion Span 3 Years Ago Last Post by pzuurveen 0 3 Years Ago Hello, Noob alert!! I tried to https://discussions.vtiger.com/index.php?p=/discussion/166700/why-do-i-get-fatal-error-call-to-undefined-function-session_register/p1 protect some pages with a code I found googling. But since my server was recently moved to a better one, the code stoped working and gives me the error "Fatal error: call to Call 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 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 call to undefined