Posted by weetat on 03/09/07 09:18
Hi all,
Below is my php code , basically the code will loop the posted
selected country.
My question is how to differentiate the HTML tag name below :
<td class="normal"><textarea id="location_address_1"
name="location_address[]" class="normal" rows="5"
cols="48"></textarea></td>
for e.g :
Country Address1 Address2
UK London Oracle Building
UK Liverpool Liverpool Tower
USA Boston Boston avenue
I have many multiple country which are the same and different.
How to get the correct $_POST values from it ?
<?php
while (list($name, $country)=each($selected_countries))
{
if ($country != '')
{
?>
<tr id="country_tr">
<td class="normal" > </td>
<td><span class="normal"><b>Country :</b></span></td>
<td class="normal" > </td>
<td class="normal" ><b><?php echo $country; ?></b></td>
</tr>
<tr id="address_location_1_tr">
<td class="normal" > </td>
<td>
<span class="normal">Address of Location 1:</span>
</td>
<td class="normal" > </td>
<td class="normal"><textarea id="location_address_1"
name="location_address[]" class="normal" rows="5" cols="48"></
textarea></td>
</tr>
<tr id="address_location_2_tr">
<td class="normal" > </td>
<td>
<span class="normal">Address of Location 2:</span>
</td>
<td class="normal" > </td>
<td class="normal"><textarea id="location_address_2"
name="location_address[]" class="normal" rows="5" cols="48"></
textarea></td>
</tr>
<tr id="postalcode_tr">
<td class="normal" > </td>
<td><span class="normal">Postal Code :</span></td>
<td class="normal" > </td>
<td><input type="text" id="postalcode_text" class="normal"
size="18" name="postalcode[]" value=""></td>
</tr>
<tr>
<td class="normal" > </td>
<td class="normal" > </td>
</tr>
<?php
}
}
?>
<tr>
Navigation:
[Reply to this message]
|