Dear All,
I am doing a login screen and I want to change the URL in the action =
part of my HTML based on the authenticity of my login. ie if I am having =
a sucessful login I would like to call one URL and if my login fails, I =
would like to call another URL.. Can someone explain me how exactly this =
can be done??
Saji D
------=_NextPart_000_002D_01BFBBF8.FD43B660
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Dear All,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I am doing a login screen and I want to =
change the=20
URL in the action part of my HTML based on the authenticity of my login. =
ie if I=20
am having a sucessful login I would like to call one URL and if my login =
fails,=20
I would like to call another URL.. Can someone explain me how exactly =
this can=20
be done??</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Saji D</FONT></DIV></BODY></HTML>
------=_NextPart_000_002D_01BFBBF8.FD43B660--
Check out the PHP function "header".
http://www.php.net/manual/function.header.php3
You send a header command before you output anything else to the browser, so
decide where you want to send the person, then send a header.
Like this:
header("Location: http://www.php.net");
Peace out, BRO
Jay Thomas
ranchoweb.com
----- Original Message -----
From: "Saji D" <sa...@hcl.co.in>
To: "PHP" <ph...@lists.php.net>
Sent: Thursday, May 11, 2000 9:31 PM
Subject: [PHP3] PHP - How to Create Dyanamic URL's
Dear All,
I am doing a login screen and I want to change the URL in the action part of
my HTML based on the authenticity of my login. ie if I am having a sucessful
login I would like to call one URL and if my login fails, I would like to
call another URL.. Can someone explain me how exactly this can be done??
Saji D
--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-uns...@lists.php.net
To subscribe to the digest, e-mail: php3-diges...@lists.php.net
To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-lis...@lists.php.net
> I am doing a login screen and I want to change the URL in the action =
> part of my HTML based on the authenticity of my login. ie if I am having =
> a sucessful login I would like to call one URL and if my login fails, I =
> would like to call another URL.. Can someone explain me how exactly this =
> can be done??
You don't change the ACTION, because that would require you to be psychic
to know in advance which ACTION to use for the username/password they
type.
But, in the *receiving* PHP script, you lookup their username and where
you want to send them.
Then, you can either write the receiving script to present different
contents based on their login, or you can use a redirect (location) header
to send them where you like:
<?php
//Look up $username/$password
//If valid, look up their $homepage as well
header("Location: $homepage");
?>