Zubrag.com
September 22, 2019, 10:50:06 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Welcome Message  (Read 42441 times)
nomad
Newbie
*
Posts: 1


« on: November 02, 2007, 08:31:05 AM »

Script works BUT I have 2 problems:
1 - once I log in I can't get the log in page to view again..it automatically logs me in.. I don't want this. (I even cleared cache and cookies)

2- How can I use the information entered into User Name field to be displayed on the page I log into.( For example: Login Name = USER123   ..  the page displayed after I log in will display for example .. Welcome USER123)

Thanks

Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #1 on: November 02, 2007, 12:21:30 PM »

1. You will be automatically logged out when browser is closed. You can also place a log out link. Add following code somewhere on your page:   <a href="your-protected-page.php?logout">Log out</a>

2. Replace if ($_COOKIE['verify'] == md5($lp)) {
with
if ($_COOKIE['verify'] == md5($lp)) {
$login = $key;

Now you can print username using following php code:   echo $login;


Logged
cappinkirk
Newbie
*
Posts: 2


« Reply #2 on: March 17, 2008, 07:16:53 AM »

No, that is not very helpful. I have read all of the existing forums and I think I have also been as descriptive as possible with stating what I want to achieve. I am developing this on my own in the meantime.

Thanks!
Logged
Twizted
Newbie
*
Posts: 1


« Reply #3 on: June 28, 2009, 02:05:05 PM »

Hello,

    I have been experimenting with your scripts Password Protect and Advanced Password Protect and they are really awesome. I am having some issues obtaining some additional functionality that I desire for my pages. I would like to be able to maintain the $login variable throughout the website once a user it logged in so I can use it to show only certain logged in users content on pages such as reset buttons for a database and such.

As it works now I can echo $login on the very next page that loads after login, but once I navigate away from that page or reload that page the content will disappear because the variable is not maintained.

How could I achieve this with your scripts Password Protect and Advanced Password Protect.

Thank you !
Logged
noorim07
Newbie
*
Posts: 2


« Reply #4 on: December 06, 2009, 01:12:22 PM »

1. You will be automatically logged out when browser is closed. You can also place a log out link. Add following code somewhere on your page:   <a href="your-protected-page.php?logout">Log out</a>

2. Replace if ($_COOKIE['verify'] == md5($lp)) {
with
if ($_COOKIE['verify'] == md5($lp)) {
$login = $key;

Now you can print username using following php code:   echo $login;

hi is this the one you meant?

if ($_COOKIE['verify'] == md5($lp)) {
$found = true;

change to

if ($_COOKIE['verify'] == md5($lp)) {
$login = $key;


Logged
noorim07
Newbie
*
Posts: 2


« Reply #5 on: December 09, 2009, 05:03:05 PM »

I got it! That is the method.
Logged
rainer
Newbie
*
Posts: 1


« Reply #6 on: July 23, 2010, 02:16:52 AM »

i tried the same method, to print the username on my website, but the only thing i get is that error message Notice: Undefined variable: login

any hints, what i am doing wrong?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC