Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Help!!!! PHP Login Setup

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Help!!!! PHP Login Setup

Postby maudenton » Mon Oct 01, 2012 9:42 am

Hello,
I am a newbie to php and need some help. I am trying to create a membership site and did so with this tutorial -----> http://www.phpeasystep.com/workshopview.php?id=6 in expression web. Everything seems to work fine except once i try to log in i get this error ----->
Deprecated: Function session_is_registered() is deprecated in D:\Hosting\9866233\html\newlaw\login_success.php on line 13
Login Successful


this is the line/section it is referring to ---->
<?php
session_start();
if(!session_is_registered(myusername)){
header("location:main_login.php");
}
?>


Can someone tell me how to fix this so it works, all the other information for the tutorial can be found at the link above or point me to another basic tutorial that actually works Please!!!
maudenton
New php-forum User
New php-forum User
 
Posts: 5
Joined: Mon Oct 01, 2012 9:32 am

Re: Help!!!! PHP Login Setup

Postby Harok » Mon Oct 01, 2012 10:35 am

Try to change
Code: Select all
session_register("myusername/mypassword");
to
Code: Select all
$_SESSION["myusername/mypassword"];
and change
Code: Select all
if(!session_is_registered(myusername)){
to
Code: Select all
if(!empty($_SESSION["myusername"])){


:)
Harok
New php-forum User
New php-forum User
 
Posts: 3
Joined: Mon Oct 01, 2012 10:13 am

Re: Help!!!! PHP Login Setup

Postby maudenton » Tue Oct 02, 2012 1:25 pm

Thank you !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! a million times. That worked!!
maudenton
New php-forum User
New php-forum User
 
Posts: 5
Joined: Mon Oct 01, 2012 9:32 am


Return to PHP coding => General

Who is online

Users browsing this forum: Baidu [Spider], bshedd86 and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.