Php.docx

  • Uploaded by: Vishnu P S
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Php.docx as PDF for free.

More details

  • Words: 408
  • Pages: 18
query($sql); $count=$db->num_rows($result); if($count!=0) { $row=$db->fetch_array($result); $uid=$row['u_id']; $utype=$row['u_type']; if($utype=='A') header('location:adminHome.php'); else header('location:userHome.php?uid='.$uid); } else { $suc="incorrect user name and password try again"; header('location:login.php?suc='.$suc);

} }

//addservices if(isset($_REQUEST['services'])) { $services=$_POST['services']; $sql="INSERT INTO `plazaauditorium`.`services` (`services`)VALUES('".$services."')"; $result=$db->query($sql); if($result) { $suc="services added successfully"; } else { $suc="error occured try again"; } header('location:addservices.php?suc='.$suc); }

//addgallery if(isset($_REQUEST['gallery'])) {

$gallery=$_POST['gallery']; $sql="INSERT INTO `plazaauditorium`.`gallery` (`gallery`)VALUES('".$gallery."')"; $result=$db->query($sql); if($result) { $suc="image added successfully"; } else { $suc="error occured try again"; } header('location:addgallery.php?suc='.$suc); }

//register if(isset($_REQUEST['register'])) { $name=$_POST['name']; $address=$_POST['address']; $email=$_POST['email']; $mnumber=$_POST['mnumber']; $password=$_POST['password'];

$cpassword=$_POST['cpassword']; $u_type="U"; $sql="INSERT INTO `plazaauditorium`.`users` ( `user`, `password`, `u_type`)VALUES('".$name."','".$password."','".$u_type."')"; $result=$db->query($sql); $id=$db->insert_id(); if($result) { $sql="INSERT INTO `plazaauditorium`.`register` ( `name`, `address`, `email`, `mnumber`, `password`, `cpassword`,`u_id`) VALUES('".$name."','".$address."','".$email."','".$mnumber."','".$password."','".$cpassword."','".$id."')"; $result=$db->query($sql); if($result) { $suc="register successfully"; } else { $suc="error occured try again"; } header('location:register.php?suc='.$suc); } }

//booking if(isset($_REQUEST['booking']))

{ $events=$_POST['events']; $amount=$_POST['amount']; $time=$_POST['time']; $date=$_POST['date']; $month=$_POST['month']; $year=$_POST['year']; $b_type=$_POST['b_type']; $u_type="U"; $sql="INSERT INTO `plazaauditorium`.`users` ( `user`, `password`, `u_type`)VALUES('".$user."','".$password."','".$u_type."')"; $result=$db->query($sql); $id=$db->insert_id(); if($result) { $sql="INSERT INTO `plazaauditorium`.`booking` ( `events`, `amount`, `time`, `date`, `month`, `year`, `b_type`, `u_id`)VALUES('".$events."','".$amount."','".$time."','".$date."','".$month."','".$year."','".$b_type."','".$i d."')"; $result=$db->query($sql); if($result) { $suc="booking successfully"; } else { $suc="error occured try again";

} header('location:booking.php?suc='.$suc); } }

//catering if(isset($_REQUEST['catering'])) { $non_veg=$_POST['non_veg']; $bb=$_POST['bb']; $cb=$_POST['cb']; $mb=$_POST['mb']; $kabsa=$_POST['kabsa']; $cs=$_POST['cs']; $others=$_POST['others']; $veg=$_POST['veg']; $sad=$_POST['sad']; $vb=$_POST['vb']; $vs=$_POST['vs']; $other=$_POST['other']; $drink=$_POST['drink']; $fj=$_POST['fj']; $lj=$_POST['lj'];

$othe=$_POST['othe']; $time=$_POST['time']; $date=$_POST['date']; $month=$_POST['month']; $year=$_POST['year']; $u_type="U"; $sql="INSERT INTO `plazaauditorium`.`users` ( `user`, `password`, `u_type`)VALUES('".$name."','".$password."','".$u_type."')"; $result=$db->query($sql); $id=$db->insert_id(); if($result) { $sql="INSERT INTO `plazaauditorium`.`catering` ( `non_veg`, `bb`, `cb`, `mb`, `kabsa`, `cs`, `others`, `veg`, `sad`, `vb`, `vs`, `other`, `drink`, `fj`, `lj`, `othe`,`time`, `date`, `month`, `year`, `u_id`)VALUES('".$non_veg."','".$bb."','".$cb."','".$mb."','".$kabsa."','".$cs."','".$others."','".$veg."','".$sa d."','".$vb."','".$vs."','".$other."','".$drink."','".$fj."','".$lj."','".$othe."','".$time."','".$date."','".$month."',' ".$year."','".$id."')"; $result=$db->query($sql); if($result) { $suc="add successfully"; } else { $suc="error occured try again"; } header('location:catering.php?suc='.$suc);

} }

//makeup if(isset($_REQUEST['makeup'])) { $name=$_POST['name']; $service=$_POST['service']; $makeup=$_POST['makeup']; $facial=$_POST['facial']; $hc=$_POST['hc']; $meh=$_POST['meh']; $hs=$_POST['hs']; $others=$_POST['others']; $time=$_POST['time']; $date=$_POST['date']; $month=$_POST['month']; $year=$_POST['year']; $sql="INSERT INTO `plazaauditorium`.`makeup` ( `name`, `service`, `makeup`, `facial`, `hc`, `meh`, `hs`, `others`, `time`, `date`, `month`, `year`)VALUES('".$name."','".$service."','".$makeup."','".$facial."','".$hc."','".$meh."','".$hs."','".$others. "','".$time."','".$date."','".$month."','".$year."')"; $result=$db->query($sql); if($result) { $suc="add successfully";

} else { $suc="error occured try again"; } header('location:makeup.php?suc='.$suc); }

//photo if(isset($_REQUEST['photo'])) { $name=$_POST['name']; $event=$_POST['event']; $photo=$_POST['photo']; $video=$_POST['video']; $time=$_POST['time']; $date=$_POST['date']; $month=$_POST['month']; $year=$_POST['year']; $sql="INSERT INTO `plazaauditorium`.`photo` ( `name`, `event`, `photo`, `video`, `time`, `date`, `month`, `year`)VALUES('".$name."','".$event."','".$photo."','".$video."','".$time."','".$date."','".$month."','".$year ."')"; $result=$db->query($sql); if($result) {

$suc="add successfully"; } else { $suc="error occured try again"; } header('location:photo.php?suc='.$suc); }

//decorations if(isset($_REQUEST['decorations'])) { $event=$_POST['event']; $stage=$_POST['stage']; $hall=$_POST['hall']; $music=$_POST['music']; $mike=$_POST['mike']; $date=$_POST['date']; $month=$_POST['month']; $year=$_POST['year']; $u_type="U"; $sql="INSERT INTO `plazaauditorium`.`users` ( `user`, `password`, `u_type`)VALUES('".$name."','".$password."','".$u_type."')"; $result=$db->query($sql); $id=$db->insert_id();

if($result) { $sql="INSERT INTO `plazaauditorium`.`decorations` ( `event`, `stage`, `hall`, `music`, `mike`, `date`, `month`, `year`, `u_id`)VALUES('".$event."','".$stage."','".$hall."','".$music."','".$mike."','".$date."','".$month."','".$year."' ,'".$id."')"; $result=$db->query($sql); if($result) { $suc="add successfully"; } else { $suc="error occured try again"; } header('location:decorations.php?suc='.$suc); } }

//

//

?>

More Documents from "Vishnu P S"

Php.docx
November 2019 10
Assignment Cyber.docx
December 2019 10
Abstract ,criminology.docx
December 2019 5
Bss Assignment.docx
May 2020 10
Great Depression.docx
December 2019 15