how to list out the submited data in same page where form submitted?
- by OM The Eternity
I have a form with 3 text values and one image..
I want to save these values such that i can display these records in the list below..
how can i do that...
I am using osCommerce
For example:
<form method="post" id="fm-form" action ="" enctype="multipart/form-data">
<label>Name:</label>
<input type="text" id="fm-name" name="fm-name" value="" />
<label>Email:</label>
<input type="text" id="fm-email" name="fm-email" value="" />
<label>Birthdate:</label>
<input type="text" id="fm-birthdate" name="fm-birthdate" value="" />
<input type="file" id="fm-image" name="fm-image"/>
<input type="submit" id="fm-submit" value="Save it">
</form>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr >
<td align="center" class="productListing-heading">Product(s)</td>
<td align="center" class="productListing-heading">Edit</td>
<td align="center" class="productListing-heading">Delete</td>
</tr>
<?php for($i=0;$i<$count_image;$i++){?>
<tr>
<td align="left" class="productListing-data1">
<?php echo tep_image(DIR_WS_IMAGES . $file_realname, $save_image[$i], '110', '110');?>
</td>
<td align="center" class="productListing-data1">Edit</td>
<td align="center" class="productListing-data1">Delete</td>
</tr>
<tr><td> </td></tr>
<?php }?> </table>
In the above format as the form is submitted the image has to be stored in a count_image array variable... and the on its count, the list below the form is displayed.. but i cannot get it worked.. could u pls help in doing this...