This script allows you create a multiple entry form on the fly. The end-user determines how many entries they want and the form is created accordingly.
Download
View Source (print view)
Rating : 4.7
Views : 155
<!--
This is a free script - I hope it helps someone.
Keep Open Source Free!
This script allows you create a multiple entry form on the fly.
The end-user determines how many entries they want and the form
is created accordingly.
michael gbadebo
mailforever@yahoo.com
-->
<font size=3 color=red><b>go Create</b></font><hr><p>
<?php
$linenum = 1;
?>
<form method="post" action="<?php echo $ME; ?>">
How many name(s)
<input type=text name=cell value="" size=2 max=2> do you want to register?
<input type=hidden name=formname value="cellform" size=2 max=2>
<input type=submit value="go create!">
</form>
<form method="post" action="<?php echo $ME; ?>">
<input type=hidden name=formname value="inputform" size=2 max=2>
<input type=hidden name=passcell value="<?php echo $cell; ?>">
<table border=1>
<?php
if ($formname=="cellform"){
if ($cell) {
?>
<tr>
<td><b>No</b</td><td><b>First Name</b></td><td><b>Last Name</b></td><td><b>Nick Name</b></td>
</tr>
<?php
while ($linenum <= $cell){
$line = "<tr>";
$line .= "<td>$linenum</td><td><input type=text name="cella$linenum" value=""></td><td><input type=text name="cellb$linenum" value=""></td><td><input type=text name="cellc$linenum" value=""></td>";
$line .= "</tr>";
echo $line;
$linenum = ++$linenum;
}
$cell = $passcell;
?>
<tr><td> </td><td colspan=3><input type=submit value="save my stuff!"></td></tr>
<?php
}
}
?>
</table>
</form>
<?php
if ($formname=="inputform"){
?>
<table border=1>
<tr>
<td><b>No</b</td><td><b>First Name</b></td><td><b>Last Name</b></td><td><b>Nick Name</b></td>
</tr>
<?php
while ($linenum <= $passcell){
$myumma="cella".$linenum;
$myummb="cellb".$linenum;
$myummc="cellc".$linenum;
echo "<tr><td>$linenum</td><td>".$$myumma."</td><td>".$$myummb."</td><td>".$$myummc."</td></tr>";
$linenum = ++$linenum;
}
echo "<p>".$passcell." name(s) where saved";
?>
</table>
<?php } ?>
guestbook, doc, pdf, rtf, xsl files to a single pdf at runtime, utfraw, fedex, chat, design_in_php, eval, iaroi_adriana, rss, xslt, i need webmail login name and password, search results, project, php script" class="neww" target="_blank" title="im neuen, unction, yahoo status check, anton sorina, guest, php snips, doc,_pdf,_rtf,_xsl__files_to_a_single_pdf_at_runtime