include("header.inc"); require("db.inc"); require("lib.inc"); $link = mysql_pconnect("localhost", $dbuser, $dbpass); mysql_select_db($dbname); if($f=="added") { $query = "insert into costsets (name, observ_cost, sample_cost, falsea_cost, repair_cost, pr_rate, nonconf_cost) values ('$name', '$observ_cost', '$sample_cost', '$falsea_cost', '$repair_cost', '$pr_rate', '$nonconf_cost')"; mysql_query($query) or die(mysql_error()); $f="finito"; } else if ($f=="mod2") { $query = "update costsets set name='$name', observ_cost='$observ_cost', sample_cost='$sample_cost', falsea_cost='$falsea_cost', repair_cost='$repair_cost', pr_rate='$pr_rate', nonconf_cost='$nonconf_cost' where id='$id'"; mysql_query($query) or die(mysql_error()); $f="finito"; } if(!isset($f) || $f=="finito") { $query = "select id, name from costsets"; $result = mysql_query($query); ?>
| Name | Operations |
| %s | Edit |
|
| |