NYCPHP Meetup

NYPHP.org

how to pass the dynamic array indexes from one form to another in PHP 4.2

LS lss1 at netzero.net
Tue Mar 4 16:16:57 EST 2003


hi;
I have a problem.I don't know what to write in my program dynamic2.php. The program dynamic.php passes array to program dynamic2.php. What code should
be written in dynamic2.php ?
thnks
Leo
attached codes for both programs

code for dynamic.php:
<HTML>
<HEAD></HEAD>
<BODY>
<FORM METHOD=GET ACTION="dynamic2.php">
<?php
for ($Counter=0; $Counter<$_POST['Number']; $Counter++)
{
   $Offset = $Counter+1;
   echo "<BR><BR>Please enter the name of child number $Offset<BR>";
   echo "<INPUT NAME=Child[] TYPE=TEXT>";
}
if ($Counter==0) echo"Press the button to move on";
?>
<BR>
<BR>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>

--code for dynamic2.php:
<HTML>
<HEAD></HEAD>
<BODY>
<?php
$Count=0;
echo "yoe children names are :";
do
; $Counter++)
{
      echo "<BR><BR>$_GET['Number']";//?
   echo "<INPUT NAME=Child[] TYPE=TEXT>";
}
if ($Counter==0) echo"Press the button to move on";
?>
<BR>
<BR>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030304/2c63c07a/attachment.html>


More information about the talk mailing list