require_once("../conn.php"); require_once("access.php"); include_once("LeftStyles.php"); ?>
if(isset($_POST[s1])) { $q1 = "insert into yellow_prices set PackageName = '$_POST[PackageName]', PriceValue = '$_POST[NewPrice]', Duration = '$_POST[nDuration]', PriorityLevel = '$_POST[pLevel]' "; mysql_query($q1) or die(mysql_error()); } //show prices $q1 = "select * from yellow_prices, yellow_priority where yellow_prices.PriorityLevel = yellow_priority.PriorityLevel order by yellow_prices.PriorityLevel desc"; $r1 = mysql_query($q1) or die(mysql_error()); if(mysql_num_rows($r1) == '0') { exit(); } ?>Package Name | Priority Level | Duration | Price | Action | while($a1 = mysql_fetch_array($r1)) { $MyPrice = number_format($a1[PriceValue], 2, ".", ""); if($a1[Duration] > '1') { $MyDuration = $a1[Duration]." months"; } else { $MyDuration = $a1[Duration]." month"; } echo "
$a1[PackageName] | \n\t$a1[PriorityName] | \n\t$MyDuration | \n\t$MyPrice | \n\tedit | delete | \n