Project Report of Electricity Billing System Page 1


Project Report of Electricity Billing System



Yüklə 3,34 Mb.
Pdf görüntüsü
səhifə40/46
tarix28.11.2023
ölçüsü3,34 Mb.
#169352
1   ...   36   37   38   39   40   41   42   43   ...   46
tuxdoc.com electricity-billing-system

Project Report of Electricity Billing System 
 
Page - 96 
oding for Room.php 
include_once("../includes/db_connect.php"); 
include_once("../includes/functions.php"); 
if($_REQUEST[act]=="save_room") 

save_room(); 
exit; 

if($_REQUEST[act]=="delete_room") 

delete_room(); 
exit; 



Project Report of Electricity Billing System 
 
Page - 97 
###Code for save room##### 
function save_room() 

$R=$_REQUEST; 
$image_name = $_FILES[room_image][name]; 
$location = $_FILES[room_image][tmp_name]; 
if($image_name!="") 

move_uploaded_file($location,"../uploads/".$image_name); 

else 

$image_name = $R[avail_image]; 

$facility_id = implode(",",$R['room_facility_id']); 
if($R[room_id]) 


Project Report of Electricity Billing System 
 
Page - 98 

$statement = "UPDATE `room` SET"; 
$cond = "WHERE `room_id` = '$R[room_id]'"; 
$msg = "Data Updated Successfully."; 

else 

$statement = "INSERT INTO `room` SET"; 
$cond = ""; 
$msg="Data saved successfully."; 

$SQL= $statement."
`room_category_id` = '$R[room_category_id]',
`room_title` = '$R[room_title]', 
`room_facility_id` = '$facility_id',


Project Report of Electricity Billing System 
 
Page - 99 
`room_name` = '$R[room_name]', 
`room_no_of_beds` = '$R[room_no_of_beds]',
`room_max_adult` = '$R[room_max_adult]', 
`room_max_child` = '$R[room_max_child]', 
`room_fare` = '$R[room_fare]', 
`room_image` = '$image_name', 
`room_description` = '$R[room_description]'".
$cond; 
$rs = mysql_query($SQL) or die(mysql_error()); 
header("Location:../room-report.php?msg=$msg"); 

#########Function for delete room##########3 
function delete_room() 

/////////Delete the record////////// 
$SQL="DELETE FROM room WHERE room_id = $_REQUEST[room_id]"; 



Yüklə 3,34 Mb.

Dostları ilə paylaş:
1   ...   36   37   38   39   40   41   42   43   ...   46




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin