Project Report of Electricity Billing System
Page - 81
`connection_add_email` = '$R[connection_add_email]',
`connection_request_load` = '$R[connection_request_load]',
`connection_contract_demand` = '$R[connection_contract_demand]',
`connection_plot` = '$R[connection_plot]',
`connection_description` = '$R[connection_description]',
`connection_address` = '$R[connection_address]'".
$cond;
$rs = mysql_query($SQL) or die(mysql_error());
header("Location:../connection-report.php?msg=$msg");
}
#########Function for delete connection##########3
function delete_connection()
{
/////////Delete the record//////////
$SQL="DELETE FROM connection WHERE connection_id = $_REQUEST[connection_id]";
mysql_query($SQL) or die(mysql_error());
Project Report of Electricity Billing System
Page - 82
header("Location:../connection-report.php?msg=Deleted Successfully.");
}
?>
Project Report of Electricity Billing System
Page - 83
Coding for Facility.php
include_once("../includes/db_connect.php");
include_once("../includes/functions.php");
if($_REQUEST[act]=="save_facility")
{
save_facility();
exit;
}
if($_REQUEST[act]=="delete_facility")
{
delete_facility();
exit;
}
if($_REQUEST[act]=="update_facility_status")
Project Report of Electricity Billing System
Page - 84
{
update_facility_status();
exit;
}
###Code for save facility#####
function save_facility()
{
$R=$_REQUEST;
if($R[facility_id])
{
$statement = "UPDATE `facility` SET";
$cond = "WHERE `facility_id` = '$R[facility_id]'";
$msg = "Data Updated Successfully.";
}
else
|