[HELP]Getting value from multiple forms
Posted: Mon Jan 24, 2011 10:16 pm
Hi! guys
I need some help how to view all the forms that has been filled already by the user
phpex1.php


can any one give me some pointers or example on how to view the values from this multiple forms
thanks
I need some help how to view all the forms that has been filled already by the user
phpex1.php
Code: Select all
<center>
<head>
</head>
<div class="art-content">
<form name="signup" id="signup" method="post" action="phpex1input.php">
<font face="Verdana" size="4" color="#008080">Enter number of customers:
</font></b> <input type="text" name="t1" id="t1" size="20"><input type="submit" name="submit" value="Register" tabindex="8" ><input type="reset" value="Reset" name="B2">
</form>
</center>
Code: Select all
<?php
if($_POST['submit']) {
$count = 0;
$t1 = $_POST['t1'];
while ($count != $t1){
echo "<form method='POST' action=''>
<table border='0' width='68%' bordercolorlight='#003300' bordercolordark='#009933'>
<tr>
<td width='21%' bgcolor='#339966'><b>
<font face='Verdana' size='2' color='#99FFCC'>Customer's Name:
</font></b></td>
<td width='58%' bgcolor='#99FFCC'>
<font color='#008080'face='Verdana'>
<input name='T2' size='20' style='background-color: #66FF66'></font></td>
</tr>
<tr>
<td width='21%' bgcolor='#339966'><b>
<font face='Verdana' size='2' color='#99FFCC'>Item Bought:</font></b></td>
<td width='58%' bgcolor='#99FFCC'>
<font color='#008080' face='Verdana'>
<span style='background-color: #66FF66'><font color='#99FFCC'>
<select size='1' name='D1' style='color: #008080'><option>Grocery Package 1</option><option>Grocery Package 2</option>
<option>Grocery Package 3</option><option>Grocery Package 4</option></select></font></span></font></td>
</tr>
<tr>
<td width='21%' bgcolor='#339966'><b>
<font face='Verdana' size='2' color='#99FFCC'>Quantity:</font></b></td>
<td width='58%' bgcolor='#99FFCC'>
<font color='#008080' face='Verdana'>
<input name='T1' size='5' style='background-color: #66FF66'></font></td>
</tr>
<tr>
<td width='21%' bgcolor='#339966'><b>
<font face='Verdana' size='2' color='#99FFCC'>Mode of Payment:
</font></b></td>
<td width='58%'bgcolor='#99FFCC'><font face='Verdana'>
<font color='#008080'> <span style='background-color: #66FF66'> <input type='radio' name='mode' value='Cash' checked></span></font><font size='2' color='#008080'> Cash
</font><span style='background-color: #66FF66'><font color='#008080'>
<input type='radio' name='mode' value='Credit Card'></font></span><font size='2' color='#008080'> Credit Card
</font><span style='background-color: #66FF66'><font color='#008080'>
<input type='radio' name='mode' value='COD'></font></span><font size='2' color='#008080'> Cash on Delivery</font></font></td>
</tr>
<tr>
<td width='21%' bgcolor='#339966'><b>
<font face='Verdana' size='2' color='#99FFCC'>Discount Types:</font></b></td>
<td width='58%' bgcolor='#99FFCC'><font face='Verdana'>
<font color='#008080'>
<span style='background-color: #66FF66'>
<input type='checkbox' name='Discount1' value='Senior Citizen'></span></font><font size='2' color='#008080'>Senior Citizen
</font><span style='background-color: #66FF66'><font color='#008080'>
<input type='checkbox' name='Discount2' value='Membership Card'></font></span><font size='2' color='#008080'>Membership Card
</font><span style='background-color: #66FF66'><font color='#008080'>
<input type='checkbox' name='Discount' value='Promo Values'></font></span><font size='2' color='#008080'>Promo Values</font></font></td>
</tr>
<tr>
<td colspan='2' bgcolor='#99FFCC'>
<p align='right'><font color='#008080' face='Verdana'>
<input type='reset' value='Reset' name='B2'></font></td>
</tr>
</table>
</form>";
$count++;
}
}
?>

can any one give me some pointers or example on how to view the values from this multiple forms
thanks