But if I want to use $username accross many pages then I will have to make it a session variable and call it as such on each page like "$_SESSION['username']"
Thanks again! "Chris W. Parker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] BOOT <mailto:[EMAIL PROTECTED]> on Wednesday, April 14, 2004 12:17 PM said: > So I went and turned them off. Now of course my pages don't work > properly. I guess I have to go through all my code and address the > variables properly ie. $_POST and $_SESSION? no. just assign them at the beginning of your file. CURRENT FILE: <?php echo "$username is logged in!!"; echo "hello $username, you are logged in."; ?> WHAT I THINK YOU WOULD CHANGE IT TO: <?php echo "{$_GET['username']} is logged in!!"; echo "hello {$_GET['username']}, you are logged in."; ?> WHAT YOU SHOULD DO INSTEAD: <?php $username = $_GET['username']; echo "$username is logged in!!"; echo "hello $username, you are logged in."; ?> of course. don't forget to validate your incoming data. hth, chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php