Jump to content


automatically load a page once user logs in.


  • Please log in to reply
2 replies to this topic

#1 _*The_Interceptor_*

_*The_Interceptor_*
  • Guests

Posted 29 April 2004 - 03:01 PM

Is there an easy way to automatically send a user to a page, once they click on a form submit button?

I have a user managment system, and I'm trying to send the user to a news page once they log in.

The way I have it right now is the user logs in, and a file called, checkuser.php is called which verify's the user. I want to then call the news.php page from within the checkuser page.

I've tried using:

header("Location:news.php");

but this isn't working. I know I can just make an href link and send them in that way, but I rather do it automatically.

#2 Faken

Faken

    Pimpmaster G

  • Admin
  • 5,966 posts
  • Gender:Male
  • Location:Montreal, Canada

Posted 29 April 2004 - 03:27 PM

Like this:

<?php
$url = "http://somesite.com/index.php"; // target of the redirect
$delay = "3"; // 3 second delay

echo '<meta http-equiv="refresh" content="'.$delay.';url='.$url.'">';

?>

The meta goes in the head of the HTML.

Hope that helps :D

Faken

#3 _*The_Interceptor_*

_*The_Interceptor_*
  • Guests

Posted 29 April 2004 - 04:01 PM

I tried using it, but for some reason when it loads the page, not all of the css gets loaded with the page.

I used the meta refresh within my php script.

Once the user is authenticated, refresh the page to the news page. It's wierd. The table colors were there, but the rest of the formatting I did wasn't able to be seen.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users