Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please let me know what other information is needed for my question to be answered. Thank You. I'm trying to create a PHP file for

Please let me know what other information is needed for my question to be answered. Thank You.

I'm trying to create a PHP file for a program that will connect building schematics, and panoramic images taken within the building to a mysql database. My parameters are that the schematics are in a folder called "Schematics". The panoramic images are in a folder called "Images". The naming convention for the images will be in integers. Example of image name will be: 00_00_00_0000, where it references Location_ID , Building_ID , Floor_ID , and then Image_ID. Below is a diagram of how the program will run and my starter code. The user of the program will be able to look at a floor schematic and select an area which will pull up an image taken in that area. This is the only page I need help with that is trying to connect and pull the images from the database and connecting them . Functions needed will be to create, update, and delete records for both images and schematics. Any help will be greatly appreciated.

My Starter Code in PHP ( I know this is not correct, which is why I'm begging for help):

session_start();

// Database connection info

include $_SERVER['DOCUMENT_ROOT'] . "/include/config.php";

// Try and connect using the info above

$con = mysqli_connect($DATABASE_HOST, $DATABASE_USER, $DATABASE_PASS, $DATABASE_NAME);

if ( mysqli_connect_errno() ) {

// If there is an error with the connection, stop and display the error

exit('Failed to connect to MySQL: ' . mysqli_connect_error());

}

$Location_ID;

$Building_ID;

$Schematic_ID;

$Floor_ID;

$Image_ID;

function(int Location_ID, int Building_ID, int Schematic_ID, int Floor_ID, int Image_ID) {

filepath = "/images/ + /location/ + /building/ + /schematic/ + /floor/ + /image_id/ "

}

?>

My Database Tables When They Were Created:

/* Create Images Table */

CREATE Table Images ( Image_ID int IDENTITY(1,1) NOT NULL, Filepath varchar(255) NOT NULL,

CONSTRAINT Image_ID_PK PRIMARY KEY (Image_ID) );

/* Create Floor_Schematics Table */

CREATE Table Floor_Schematics ( Schematics_ID int IDENTITY(1,1) NOT NULL, Building_ID int IDENTITY(1,1) NOT NULL, Building_Name varchar (50) NOT NULL, Building_Floor int NOT NULL, Schematic_Data varchar (255) NOT NULL, Schematic_Filepath varchar (255) NOT NULL,

CONSTRAINT Schematics_ID_PK PRIMARY KEY (Schematics_ID), CONSTRAINT Building_ID_FK FOREIGN KEY (Building_ID), );

/* Create Buildingss Table */

CREATE Table Buildings ( Building_ID int IDENTITY (1,1) NOT NULL, Location_ID int IDENTITY (1,1) NOT NULL, Building_Name varchar (50) NOT NULL,

CONSTRAINT Building_ID_PK PRIMARY KEY (Building_ID), CONSTRAINT Location_ID_FK FOREIGN KEY (Location_ID), );

/* Create Building Location Table */

CREATE Table Building_Location ( Location_ID int IDENTITY (1,1) NOT NULL, Building_Name nvarchar (50) NOT NULL,

CONSTRAINT Location_ID_PK PRIMARY KEY (Location_ID) );

Program Diagram:

image text in transcribed

Users.php User Management Admin Panel Buildings.php Building Management CreateBuilding.php Schematic Editor Buildings.php Schematic Upload Image Upload Image.php Schematic.php Index Auth.php Login Home Users.php User Management Admin Panel Buildings.php Building Management CreateBuilding.php Schematic Editor Buildings.php Schematic Upload Image Upload Image.php Schematic.php Index Auth.php Login Home

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions

Question

Explain budgetary Control

Answered: 1 week ago

Question

Solve the integral:

Answered: 1 week ago

Question

What is meant by Non-programmed decision?

Answered: 1 week ago

Question

What are the different techniques used in decision making?

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago