Source Code Download – Business Website Directory Project [LEED]
Source Code Download – Business Website Directory Project [LEED]
authorizeuser.php
1 2 3 4 5 6 7 8 9 10 | <?php $eid=""; if (session_status() == PHP_SESSION_NONE) { session_start(); } if(isset($_SESSION["eid"])){ $eid=$_SESSION["eid"]; }else{ header('Location:index.php'); } |
connect.php
1 2 3 4 | <?php error_reporting(1); $conn = new mysqli("localhost","root","","businessdirectory"); ?> |
deleteBusiness.php
1 2 3 4 5 6 7 8 9 10 11 12 13 | <?php include 'authorizeuser.php'; if(isset($_GET['id'])){ include 'connect.php'; $id = $_GET['id']; $sql = "DELETE FROM business WHERE id=$id"; if ($conn->query($sql) === TRUE) { header('location: employerAccount.php'); }else{ echo "error deleting business"; } } ?> |
updatedbusiness.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | <?php include 'authorizeuser.php'; $id=0; $title=$email=$address=$city=$category=$description=$phone=""; include 'connect.php'; if(!isset($_POST['title']) || !isset($_POST['email']) || !isset($_POST['address']) || !isset($_POST['city']) || !isset($_POST['category'] )|| !isset($_POST['description'] ) || !isset($_POST['phone'])){ } if(isset($_POST['registerButton'])){ if($_POST['title']=="") { $msg= "Please Add title"; } else if($_POST['email']=="") { $msg= "Please Enter email"; } else if($_POST['address']=="") { $msg= "Please Enter address"; } else if($_POST['description']=="") { $msg= "Please Enter description"; } else if($_POST['phone']=="") { $msg= "Please Enter Phone No"; } else { $id=$_POST['id']; $title= $_POST['title']; $email= $_POST['email']; $address=$_POST['address']; $city=$_POST[ 'city']; $category=$_POST['category']; $description=$_POST['description']; $phone=$_POST['phone']; $sql = "UPDATE `business` set title='$title',email='$email',category='$category',city='$city',address='$address',description='$description' eid='$id' WHERE id='$id'"; $result=mysqli_query($conn,$sql); if(!$result) { } else { header('location: employerAccount.php'); } } } ?> |
uploadbusiness.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | <?php include 'authorizeuser.php'; $id=0; $title=$email=$address=$city=$category=$description=$phone=""; include 'connect.php'; if(!isset($_POST['title']) || !isset($_POST['email']) || !isset($_POST['address']) || !isset($_POST['city']) || !isset($_POST['category'] )|| !isset($_POST['description'] ) || !isset($_POST['phone'])){ } if(isset($_POST['registerButton'])){ if($_POST['title']=="") { $msg= "Please Add title"; } else if($_POST['email']=="") { $msg= "Please Enter email"; } else if($_POST['address']=="") { $msg= "Please Enter address"; } else if($_POST['description']=="") { $msg= "Please Enter description"; } else if($_POST['phone']=="") { $msg= "Please Enter Phone No"; } else { $id=$_POST['id']; $title= $_POST['title']; $email= $_POST['email']; $address=$_POST['address']; $city=$_POST['city']; $category=$_POST['category']; $description=$_POST['description']; $phone=$_POST['phone']; $sql = "INSERT INTO `business` (`id`,`title`, `email`,`eid`,`city` ,`category`,`address`, `description`, `phone`) " . "VALUES ( NULL,'$title', '$email', '$eid','$city','$category','$address', '$description', '$phone');"; $result=mysqli_query($conn,$sql); if(!$result) { } else { header('location: employerAccount.php'); } } } ?> |
Download Full Code
Source Code Download – Business Website Directory Project [LEED]
USE CASE Descriptions of Business Website Directory Project
Let’s see the USE CASE Descriptions of Business Website Directory Project. Click Here.
Test Cases of Business Website Directory Project
Let’s see the test cases of the project of the Business Directory Website. click here.