Help with adding a link in an echo statement?

Probably a stupid question, but whenever there is an error with a login or registration, I would like to provide a link to go back to rectify the problem. At the moment, for example, when someone does not enter a password to log in, I get a new screen which just says please enter the password. There is no link to go back to the login screen.

Is there a way to do this? I would also like to change the font of the error message to Century Gothic.

Here is my login code:


<? ob_start(); require_once($_SERVER['DOCUMENT_ROOT'].'/database.php'); if(isset($_SESSION['username']) && isset($_SESSION['password'])) { //REDIRECT TO USERS PROFILE... header("Location:"); } //end if logged in //IF SUBMIT BUTTON PRESSED if(isset($_POST['submit'])) { if(!$_POST['username']) die("You must enter your username before logging in."); if(!$_POST['password']) die("You must enter your password before logging in."); //set cookie if checked if(!empty($_POST['stay_in'])) { $joined =''.$_POST['username'].'[]'.md5($_POST['password']).''; setcookie('login_cookie', $joined, 2147483647, '/', ''); } //end if //verify user... $get_user = mysql_query("SELECT * FROM `members` WHERE username = '".$_POST['username']."' AND user_password = '".md5($_POST['password'])."'"); $q = mysql_fetch_object($get_user); if(!$q) die("Username or password is incorrect. Please try again."); //set session variables $_SESSION['logged_in'] = 1; $_SESSION['username'] = $_POST['username']; $_SESSION['password'] = $_POST['password']; session_write_close(); header("Location:"); } else { //show login form ?>






Remember Me?

Go Home

<? }//end else ?> [/php]


Hi there,

Simply type as follows (editing necessary parts of course):
[php]echo “Thank you. Pleae click <a href=“”>here to return to the homepage.”;

As for the font changing there are two options:

Option 1 - Inline style

<a href=\"\" style=\"font-family:'Century Gothic',Arial,Times;\">here</a>

Option 2 - Class/Id with stylesheet

<a class=\"error\" ....

CSS file;
a.error {
font-family:'Century Gothic',Arial,Times;
Sponsor our Newsletter | Privacy Policy | Terms of Service