|
Posted by Captain Paralytic on 02/22/07 12:37
On 22 Feb, 07:45, "elia" <jos...@pcl.ch> wrote:
> Hello. Yes, already ask but no answers for this little problem.
> I've got a form and 3 steps or page for the same form. If we come back
> to the first page, the states of button radio are lost.
>
> First page (form1.php)
> <?
> $gender=$_POST['gender'];
> if(isset($_POST['gender'])){
> $statusm="";
> $statusf="";
> if($_POST['gender']=="M"){$statusm="checked"}
> else{$statusf="checked"}
> ?>
>
> <Form... action="form2.php">
> ...
> <input name="gender" type="radio" id="male" value="M"<?php echo
> $statusm
> ?>> M
> <input name="gender" type="radio" id="female" value="F"<?php echo
> $statusf ?>>F
> ...
> </Form>
>
> Second page (form2.php)
> <?
> $Gender=$_POST['gender'];
> ?>
>
> <Form... action="form1.php">
> ...
> <input name="gender" type="hidden" id="gender" value="<? echo $gender ?>" />
>
> ...
> </Form>
>
> But it doesn't work!!!
>
> A solution could be with "session_start()" and $_cookie but I don't
> know how to do it!
>
> If anybody could write me all I need on the two pages with a little
> exemple?? (The same problem come with the checkox or choise with
> dynamic menu!) Thanks, pascal
When re-writing the button code on form1 include CHECKED on the one
that should be selected
Navigation:
[Reply to this message]
|