RE: [PHP-WIN] Reload
| From: | dash php | Date: | Fri, 23 Aug 2002 18:54:35 +0000 |
| Subject: | RE: [PHP-WIN] Reload | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-15481@lists.php.net to get a copy of this message | ||
Never underestimate the power of the if/elseif/else command.
Depending on your needs, you could change the isset line to
$_REQUEST['checkboxone'] == "value" if you want to depend on the value of
the checkbox. You could call separate php pages below as well.
<?php
if (isset ($_REQUEST['checkboxone']) {
header ("Location: startpage.php?content=1");
}
elseif (isset ($_REQUEST['checkboxtwo']) {
header ("Location: startpage.php?content=2");
}
else {
//Send the user back if they didn't check a box.
header ("Location: login.php");
}
?>
-Dash
-----Original Message-----
From: Rodrigo San Martin [mailto:rodrigo@stud.ntnu.no]
Sent: Friday, August 23, 2002 9:51 PM
To: php-windows@lists.php.net
Subject: [PHP-WIN] Reload
Hello.
You all must think i'm an idiot by now. Asking help for everything. I thank
those who helped me last time. I didn't use any of the solutions you sent me
insted I made on up all by my self(what a miracle).
To redirect i thought: way not let the hole script be header information and
use header("location:login.php") to redirect where ever I want to. This way
I can whrite if statements and put the adress in a variable like this:
IF (login="OK") {
$redirect="http//...../startpage.php";
}
..... and so on
At the end I whrite; header(Location:$redirect);
smart hey :)
This time I need some help to reloade the page. I have 2 selection boxes and
the first box decides the content of the second one. So if I chose 1 in the
first one the content of the second shuld be a, b and c. And if I chose 2
the content shuld be d, e and f. Get the picture??? what can i do.
thanks.
------------------------------------------
Rodrigo San Martin
Institutt for datateknologi og informatikk
http://www.idi.ntnu.no/~rodrigo
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php