You are here: Form in 2 steps - Preserving button radio « PHP Programming Language « IT news, forums, messages
Form in 2 steps - Preserving button radio

Posted by elia on 02/22/07 07:45

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация