How to get my login status to appear immediately after I login?

Posted on 2011-05-02
Last Modified: 2012-05-11
Hi, I created a log in system so that when you log in it welcomes you at the top:

here log in as this user I am testing with:

user name: fairyqueen
password: hello

it says the login was successful but I have to refresh to get the welcome, fairyqueen at the top.  How do I get it to appear right after I log in??
require_once 'includes/library.php';
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php $title ?></title>
<link rel="stylesheet" href="jewels.css" type="text/css" />
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="includes/action.js"></script>

<div id="border">
<div id="content">
<div id="header">
<div id="account">
<a href="account.php<?php echo user_id() ?>">My Account</a> | <?php echo $status ?> <br />
<?php echo $welcome ?><br />
<a href="show_cart.php">Shopping Bag </a><br />

Open in new window

Question by:FairyBusiness
    LVL 82

    Accepted Solution

    In your login function, redirect to some other page after you have logged in - ex:


    Author Closing Comment

    Good idea :)

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    This is a general how to create your own custom plugin system for your PHP application that you designed (or wish to extend a third party program to have plugin functionality that doesn't have it yet).  This is not how to make plugins for existing s…
    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    The viewer will learn how to dynamically set the form action using jQuery.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now