Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
