RE: [PHP] [Q] Howto go directly to a URL?

From: Date: Fri, 13 Feb 2004 21:09:36 +0000
Subject: RE: [PHP] [Q] Howto go directly to a URL?
Groups: php.general 
Request: Send a blank email to php-general+get-177645@lists.php.net to get a copy of this message
Try..., if($login == "successful"){ $url = "yourin.php"; } else{ $url = "tryagain.php": } header("Location: $url"); alex > -----Original Message----- > From: Michael T. Peterson [mailto:mtp1032@comcast.net] > Sent: Friday, February 13, 2004 3:03 PM > To: php-general@lists.php.net > Subject: [PHP] [Q] Howto go directly to a URL? > > I have written a very straightforward user login script. Once the user > successfully logs in, I would like my PHP script to take him directly to > the > home page. I know this sounds simple, but the only solution I've found is > a > function called do_html_url() from Welling and Thompson's book (see > > http://www.cs.indiana.edu/classes/a348/fall2001/labs/php9/do_html_url.html > ). > When this function is invoked the user is dispatched to an intermediate > web > page on which is presented a link that, when clicked, will take the user > to > the intended page. > > Can I avoid that intermediate step, somehow? When my script logs in the > user, how to I write the code that dispatches directly to the home page? > > Thanks, > > Cheers, > > Michael > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php ****************************************************************** The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. ******************************************************************

« previous php.general (#177645) next »