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 )
Did you know?Explore Trending and Topic pages for more stories like this.
{
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

Need some ideas as to how to go about sorting this array...
Here's how the array's are created..

Code: <?php
while ($x = readdir($dp)) {

Track downloads' status
Hello,

I need to make somehow, some system, to track whether downloads are completed or faile

Search function
I am looking for some guidance from the experts.

I am trying to create a search function. It

Chat Box in PHP
I was thinking in doing a Chat Box in PHP. For that I would use a form with two fields, Nick and Mes

login to other site by sending post variables
hey,

here is my problem: my school gave me a mail account for school-stuff use. they mail us

Sharing PHP Sessions Across Domains
I am in the process of writing a script to share a php session across various domains I have.
The

import table with dependency
Hi

What is the best way to import table back which has dependency?

SQL> cre

shoping cart issues
i´ve wrote this and works when i add an item to, my cart, but when i want to add othrer item just

can i optmize image to 50% quality before uploading 2 server
Hi there

i have jus written a php program to upload and display images but when i try to uplo

help countdown timers
hello every one,

I'd like to know how to insert many countdowns in the same page.
The dura

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