Re: Values not displaying in second form after post.
From: Daniel Tryba (news_comp.lang.php_at_canopus.nl)
Date: 01/03/04
- Next message: R. Rajesh Jeba Anbiah: "Re: New years eggs"
- Previous message: Daniel Tryba: "Re: command-line PHP and suppressing headers - help"
- In reply to: TG: "Values not displaying in second form after post."
- Next in thread: TG: "Re: Values not displaying in second form after post."
- Reply: TG: "Re: Values not displaying in second form after post."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 3 Jan 2004 03:54:55 +0000 (UTC)
TG <tgillette1@cox.net> wrote:
> <form method="post" action="<?php $server['PHP_SELF']?>">
>
> The server is set to parse .htm files as php. Everything else is working
> fine and all the validation checks are working fine. Based on certain
> validation checks that are within the form php code, the user is either left
> on the input form page to correct errors or if there are no errors the user
> is passed to the next form via a Java call....
Java/Javascript, what's the difference :)
> <script language="javascript">
> <!--
> location.replace("order2.htm");
> -->
> </script>
> In the second form I have tried to display the values from the first form
> after the POST using the following three methods:
>
> $fullname;
> echo $HTTP_POST_VARS['fullname'];
> echo $_POST['fullname'];
>
> Nothing works...
No kidding, just the javascript code above will not submit any form
parameters to your script. There is _no_ reason to use above js code.
Move[1] the checks to the serverside and do redirect (if needed) there.
[1] nothing wrong with clientside checks but don't rely on them for
validation and flowcontrol.
-- Daniel Tryba
- Next message: R. Rajesh Jeba Anbiah: "Re: New years eggs"
- Previous message: Daniel Tryba: "Re: command-line PHP and suppressing headers - help"
- In reply to: TG: "Values not displaying in second form after post."
- Next in thread: TG: "Re: Values not displaying in second form after post."
- Reply: TG: "Re: Values not displaying in second form after post."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|