How to make URL loads only on login


Posted on 16th Feb 2014 07:03 pm by admin

On my page, when a user login he's redirects to user_home.php. I made it also to open the chat screen when the user login.
This is the code:
Code: // USER IS LOGGED IN, FORWARD TO USER HOME
if( $user->user_exists )
{
header("Location: user_home.php");
header("javascript:launchChat();");
exit();
}
The problem is that every time, the user open user_home.php, the chat screen reloads (the user is loged out and loged in to the chat).
How to make the chat screen loads ONLY THE FIRST time, when the user login?

No comments posted yet

Your Answer:

Login to answer
327 Like 17 Dislike
Previous forums Next forums
Other forums

Extracting URL pointer within XML tag
Hi.

I'm trying to extract text between two quotation marks in XML. For example, I want to ex

Inserting Data into a MS Access DB using PHP.
As part of my uni course I am doing a placement at a company whom want me to create a client zone fo

Php script to read msword file
hi,

I need to read a msword file and i want to print the contents in that word file.

i

Problems with strings containing
Hey all,

I have encountered something strange in a script. I am trying to write an XML heade

Help with form post data and arrays
Hi all,

I am new to this forum... It has been awhile since i have worked with arrays, and i a

$action = "insert"; //$action = $_GET['action'];
$action = "insert";
//$action = $_GET['action'];

why is this invalid type? I am

XML Grouping
I'm using xml_parse_into_struct to get all my elements, but now I need to group them. For example, h

Staff Induction System - No idea where to go from here!!!
Hi there, I'm pretty new to PHP and Mysql so could really do with being pointed in the right directi

Help with writing "$" with fopen
I just can't get my syntax correct. Could someone help me please? I am trying to write a connect fil

This is driving me nuts!
This insert query looks to be alright, however I get this error:

QuoteYou have an error in yo

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash