Hey every1,
I really need ur help asap... :bemused:
Im really new to php, and im totally lost in this little "work"...
this is what im working on:
http://webpages.charter.net/driddle/fay3500a3f5.html
this is my php code right now:
<html>
<head>
<title>Assignment 3</title>
</head>
<body>
<?php
$sum=0;
for ($i=0;$i<4;$i++) {
if ($bulblist[$i]=="normal")
$sum=$sum+2.39;
else if ($bulblist[$i]=="normal2")
$sum=$sum+4.29;
else if ($bulblist[$i]=="longlife")
$sum=$sum+3.95;
else if ($bulblist[$i]=="longlife2")
$sum=$sum+7.49;
}
?>
<?php
print ("$name");
?><br>
<br>
<table width="50%" border="1">
<tr>
<th>Product</th>
<th>Price</th>
</tr>
<tr align="center">
<td>4 pieces 100W light bulbs</td>
<td>$2.39</td>
<td><?php print ("$normal"); ?></td>
<td><?php printf ("$ %7.0f", $normal_cost); ?></td>
</tr>
<tr align="center">
<td>8 pieces 100W light bulbs</td>
<td>$4.29</td>
<td><?php print ("$normal2"); ?></td>
<td><?php printf ("$ %7.0f", $normal2_cost); ?></td>
</tr>
<tr align="center">
<td>4 pieces long-life 100W light bulbs</td>
<td>$3.95</td>
<td><?php print ("$longlife"); ?></td>
<td><?php printf ("$ %7.0f", $longlife_cost); ?></td>
</tr>
<tr align="center">
<td>8 pieces long-life 100W light bulbs</td>
<td>$7.49</td>
<td><?php print ("$longlife2"); ?></td>
<td><?php printf ("$ %7.0f", $longlife2_cost); ?></td>
</tr>
</table>
<p /> <p />
<?php
print ("You ordered $sum light burbs.<br />");
printf ("Your total payment is: <br />", $total_price);
print ("Your chosen method of payment is: $payment <br />");
?>
</body>
</html>
It works only the method of payment... 🙁 nothing more...
I would appreciate any help. Thx in advance!