Help - Search - Members - Calendar
Full Version: PHP AJAX LIST
Pixel2Life Forum > Help Section > PHP, ASP, MySQL, JavaScript and other Web/Database Programming Help
pancho_villa
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>";
} ?>
Blambu
I'd love to get help for this too, this is something I've been wanting to do for a while too.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.