Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I want to make a html / php file to udate the information in my table employees. session _ start ( ) ; / /
I want to make a htmlphp file to udate the information in my table employees.
sessionstart;
Check if the user is logged in
if isset$SESSIONusername
Redirect to login page or handle unauthorized access
headerLocation: loginphp;
exit;
requireonce configphp;
Create a function to handle database connection
function connectToDatabase
global $hn $un $pw $db;
$conn new mysqli$hn $un $pw $db;
Check the database connection
if $connconnecterror
dieConnection failed: $connconnecterror;
return $conn;
The fields that need to be updated are empIDint firstNamevarchar lastNamevarchar addressvarchar cityvarchar statevarchar zipCodeint phoneNumbervarchar emailvarchar jobIDint salarydecimal hireDatedate managerIDint departmentIDint usernamevarchar creationIDintEdit Employees, and imagelongblob
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started