Error on line 13 - Echo

<?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"; } ?>

Missing the quote and semi colon at the end of the register link.

Hi Rico,

Also, you might want to change:

[php]<a href=login.php<Log In[/php]


[php]Log In[/php]

Because, if you leave it as it is, the following thing will happen.

  1. The link will not show up. Instead it will show ‘<Log In’ not ‘Log In’

Hope this helps…


You will also need to use either a single quote (’) or a backslash double quote (") around the url’s.

Sponsor our Newsletter | Privacy Policy | Terms of Service