Error on echo - Line 13

I am trying this code to create a simple log in and registration page but its giving me an error on line 13. I don’t know how to fix it. Please help
[php]

<?php //This will start a session session_start(); $username = $_SESSION['username']; $psssword = $_SESSION['password']; //Check do we have username and password if(!username && !password) { echo "Welcome Guest!
<a href=login.php<Log In | Register }else{ echo "Welcome, ".$username." Logout"; } ?>

[/php]

You had a missing quote and missing quotations around the href and your anchor tag had an inverted carrot “<”. Those darn fat fingers.

[php]<?php

//This will start a session
session_start();

$username = $_SESSION[‘username’];
$psssword = $_SESSION[‘password’];

//Check do we have username and password
if(!username && !password) {
echo “Welcome Guest!
Log In | Register
}
else
{
echo “Welcome, “.$username.” Logout”;
}

?>[/php]

also im pretty sure this line will need some work

[php]if(!username && !password) {[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service