AJAX PHP LIST
Hi guys I have created this already but I realized that I need to do this on the client side, I need to do the following I have a list which has a few packages displayed, there is an input box where the user can put a cupon code which will give them a 10% discount in the list theres 5 packages all that needs to happen is that when the code is entered that list changes its values sounds simple but I haven't been able to do it here the code. or if there another way of doing this ???
<?php print "
<input name=\"offer\" type=\"text\" class=\"textinput\" size=\"10\" maxlength=\"15\">\n\n</td>";
if(($_POST['offer']) == ($id))
{
"<td width=\"253\" height=\"23\"></td>
<tr><td height=\"23\">Choose Package:</td>
<td height=\"23\"><div id=\"content1\" style=\"width:253px;height:23px;\"></div>"; \\ will post the new list
?>
<td height="23">10% OFF</td>
<?php }
else
{
?>
</td><td width="253" height="23">
<input type="button" onclick="getdata('list.php','content1');" class="buttonSubmit" value="Apply Offer"/></td></tr>
<tr><td height="23">Choose Package: </td><td width="253" height="23">
<?php
print "<select class=\"Package\" name=\"Package\" size=\"1\" id=\"Package\">
<option value=\"\"></option>
<option value=\"349.00\">Package 1 $349</option>
<option value=\"599.00\">Package 2 $599</option>
<option value=\"749.00\">Package 3 $749</option>
<option value=\"899.00\">Package 4 $899</option>
<option value=\"1049.00\">Package 5 $1049</option>
</select>";
} ?>
PHP AJAX LIST
Started by pancho_villa, Dec 29 2008 01:20 AM
1 reply to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
