php3-list | 2000051
Date: 05/06/00
- Next message: Joseph Cheek: "[PHP3] php 3.0.16 and htdig 3.1.5"
- Previous message: Phil Driscoll: "[PHP3] Rasmus hailed as the coolest coporate suit in the known universe."
- In reply to: hakan gezgin: "[PHP3] problems with second time validation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
* hakan gezgin <webamigo <email protected>> [000506 13:21] wrote:
> hi,
>
> I wrote a little test program with 3 pages to let
> some simple validation work.
> it can be tested by beginning at:
> www.startboxes.com/test/validation/first_name.php3
>
> When I'm on page "first_name.php3" and I don't fill in
> anything it stays on page "first_name.php3" until I fill
> in my name. (that's what I want) then I fill my name.
> When I'm on page "last_name.php3" and I don't fill in
> anything then it supposed to stay on page "last_name.php3"
> but it goes to page "first_name.php3", what do I do wrong?
:)
Ok, when you're on last_name.php and don't enter anything in
then you go to father_name, father name will redirect you to
last_name which notices that now first_name is unset and then
redirects you yet again to first_name.php.
You need this in father_name:
header("Location:http://www.startboxes.com/test/validation/last_name.php3?first_name=$first_name");
You also need this in the form on the last_name page:
<input type=hidden value="<?=$first_name?>">
so you can pass first_name off to fathers_name.php
best of luck,
-Alfred Perlstein - [bright <email protected>|alfred <email protected>]
"I have the heart of a child; I keep it in a jar on my desk."
> --------------------------------------------------------
>
> www.startboxes.com/test/validation/first_name.php3
>
> <html>
> <head>
> <title>Untitled</title>
> </head>
> <body>
> <FORM METHOD="post" ACTION="last_name.php3">
> <TABLE>
> <TR>
> <TD>What's your first name? : </TD> <TD><INPUT name="first_name"></TD>
> </TR>
> <TR>
> <TD></TD><TD><INPUT type=submit value=" Continue! "></TD>
> </TR>
> </TABLE>
> </FORM>
> </body>
> </html>
>
> ---------------------------------------------------------
>
> www.startboxes.com/test/validation/last_name.php3
>
> <?php
> if ($first_name =="") {
> header("Location:http://www.startboxes.com/test/validation/first_name.php3");
> exit();
> }
> ?>
>
> <html>
> <head>
> <title>Untitled</title>
> </head>
> <body>
> <FORM METHOD="post" ACTION="fathers_name.php3">
> <TABLE>
> <TR>
> <TD>What's your last name? : </TD> <TD><INPUT name="last_name"></TD>
> </TR>
> <TR>
> <TD></TD><TD><INPUT type=submit value=" Continue! "></TD>
> </TR>
> </TABLE>
> </FORM>
> </body>
> </html>
>
> ---------------------------------------------------------
>
> www.startboxes.com/test/validation/fathers_name.php3
>
> <?php
> if ($last_name =="") {
> header("Location:http://www.startboxes.com/test/validation/last_name.php3");
> exit();
> }
> ?>
>
> <html>
> <head>
> <title>Untitled</title>
> </head>
> <body>
> <FORM METHOD="post" ACTION="friends.php3">
> <TABLE>
> <TR>
> <TD>What's your fathers name? : </TD> <TD><INPUT name="name"></TD>
> </TR>
> <TR>
> <TD></TD><TD><INPUT type=submit value=" Continue! "></TD>
> </TR>
> </TABLE>
> </FORM>
> </body>
> </html>
>
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Joseph Cheek: "[PHP3] php 3.0.16 and htdig 3.1.5"
- Previous message: Phil Driscoll: "[PHP3] Rasmus hailed as the coolest coporate suit in the known universe."
- In reply to: hakan gezgin: "[PHP3] problems with second time validation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

