Pass user name to welcome page

Started by jeff, February 26, 2009, 10:47:23 PM

jeff

hi;
Password Protect Advanced is a nice script. Just wanted to know after the user logs in , how can i pass the user login name to the page to be dispalyed in a format log "Lgged in as Jeff".

Alson when a user downlas a file , how can I write the user name to the log file ?

thanks so much
jeff

PHPwhattt?

Hi i have a way you can achive this

Here's what i did

On the password_protect.php page i created a session by placing this code (

<?php
session_start();
session_register("login");
?>

) under the html.

This passes the username variable to the next page

Then on the next page you can write this to display the logged in users name

Place this on the page

<?php
session_start();
session_register("login");
?>

Then you can place this wherever you need it in your html code

Welcome <?php echo $login ?> to my site.

Hope this helps

Simon

jimmyhendrix

The code work fine only for the first time. If I refresh the page or go to another, that doesn't work anymore.

Somebody have a way to display the login info whenever you want ?

Jimmy

zubrag