Question: I am working on a php project. I have this page were I load data from the DB. I need to display the data as
I am working on a php project. I have this page were I load data from the DB. I need to display the data as you can see here but editing my code to do it with the following steps:
1- Make each row a form and add a view button to the last cell of each row.
2- Make form action the appropriate master page.
3- Add a hidden input value to each row form and place the primary id of the row as the value.

Now, on the master page, load the hidden input value with GET or POST into a variable and use it to run a query to load the correct info.

Here is the code I have for both pages:
jobLookup:
Job Lookup
Software X
Job Lookup
Menu
Dashboard
Employees
Customers
Schedule
Settings
Logout
Search ActiveInactiveAll
//connecting to the DataBase $db = mysqli_connect('localhost', 'root', '', 'Project1'); $errors = array();
$sql="SELECT * FROM Jobs";
$results= mysqli_query($db, $sql); $jobMaster = 'jobMaster.php'; while($row = mysqli_fetch_array($results)) { echo "
"; } ?>
| Title | Company | City | State | Active |
|---|---|---|---|---|
| ".$row["JobTitle"]." | ".$row["Department"]." | ".$row["City"]." | ".$row["State"]." | ".$row["Active"]." |
jobMaster:
Job Master
Software X
Job Master
Menu
Dashboard
Employees
Customers
Schedule
Settings
Logout
Main Description Assigned History
Primary Contact
First Name Last Name Job Title
//connecting to the DataBase $db = mysqli_connect('localhost', 'root', '', 'Project1'); $errors = array();
$sql="SELECT * FROM CustomerContacts";
$results= mysqli_query($db, $sql); if($row = mysqli_fetch_array($results)){
?>
Department Phone Email
Secondary Contact
First Name Last Name Job Title
Department Phone Email
} ?>
ID localhost ocalhost:8080 localhost P.. general | CSC496 FA17 Slack CSC496 - eldager@quincy.8. Customer Master Employee Master Job Lookup Chegg Study | Guided Solutio... Software X Menu A Dashboard Job Lookup Active search Search Employees Customers Schedule Settings Title City State Active Software applications developer Apple Miami Florida Computer systems analyst Google Spain O Logout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
