I get confused with this.
I have a welcome page that reads the users cookies/sessions and then welcomes them. I am outputting the information correctly but am having trouble with how it is displayed on the screen. The result is outputting like this:
Welcome, Tracy BergerYou have successfully logged in as seebetra@test.comYour first and last names were passed by session data; your username was stored in the cookie. The cookie value is: seebetra@test.com
What I would like is:
Welcome, Tracy Berger!
You have successfully logged in as seebetra@test.com
Your first and last names were passed by session data; your username was stored in the cookie.
The cookie value is: seebetra@test.com
I seem to struggle when I have to mix in the php with the html.
Here is my code:
<?php
/ Tracy Berger (00835940)
welcome.php
/
require('libraryTEST.pinc');
$cookie= $HTTP_COOKIE_VARS["ok"];
if (!isset($cookie)){
header("Cache-Control: no-cache, must-revalidate");
}
echo "Welcome, ";
echo $SESSION[ 'fName'] . " " . $SESSION['lName'];
echo "You have successfully logged in as ";
echo $_SESSION['userName'];
echo "Your first and last names were passed by session data; your username was stored in the cookie. ";
echo "The cookie value is: ";
echo $cookie ;
?>
Any suggestions?