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?

327 Like 17 Dislike
Previous php-forum Next php-forum
Other php-forum

a very simple php header question (sorry!)
Firstly...I do apologise if this annoys anyone....a header error

I'm do not know php &

cURL and Sessions
Ohai.

So, I'm trying to cURL a bunch of things off of a page, and put them into a session. I'

Web Application Recipe
Hi Guys!

I am working with the Web Application recipes. I am currently working on the sen

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

How to use php and sql to check if values match the ones in a table (for logins)
How would I code it that the script takes two variables that are passed to it (UserID and PIN), and

start new row of pictures
on my site www.budstreasureauctions.com there is a featured auctions box that users will pay to get

Are sessions secure at all?..
I haven't really gotten into yet, but I was just thinking of something weird..

Lets say you h

generating random codes
Hi guys n gals,

I have a requirement to generate 250,000 unique codes...

These codes a

Retrieving the 25 most recently added entries from all tables in a MySQL databas
Hello,

The code below works great. It creates a table that shows the 25 most recently added t

Using CSS to format MySQL query
Hi,

If i want to have a news page on my site, which displays all records of a table in descen

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