Posted 01 August 2013 - 08:48 PM
I'm not sure what I would call what I'd like to do. I have a job application that connects to a database. It works fine and I'm happy with the way it looks and works.
Next I have another password protected php page that puts the user's contact information into a table form. This also works fine but I'd like to go further. I would like to set up the id in the database (and table) as a link that when clicked on, opens a another page with the rest of that individual's information.
My table is pretty simple code as follows.
// Check connection
echo "Failed to connect to MySQL: " . mysqli_connect_error();
$result = mysqli_query($con,"SELECT * FROM jobapp ORDER BY ID");
echo "<table border='1'><tr><th>ID</th><th>Name</th><th>Address</th><th>City</th><th>State</th><th>Zipcode</th><th>Phone</th></tr>";
while($row = mysqli_fetch_array($result))
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['first'] . " " . $row['middle'] . " " . $row['last'] . "</td>";
echo "<td>" . $row['address1'] . ", " . $row['address2'] . "</td>";
echo "<td>" . $row['city'] . "</td>";
echo "<td>" . $row['state'] . "</td>";
echo "<td>" . $row['zip'] . "</td>";
echo "<td>" . $row['phone'] . "</td>";
I'd like the id to be a link that would go to the individual's information page.
I'm sure this is out there, but not sure what it's called. Could someone help? Thanks so much!!
Posted 02 August 2013 - 08:55 AM
Is there a better spot for this? Since its links, I thought it would fit best in html, but maybe php would be better.
Posted 02 October 2013 - 02:42 PM Best Answer
yep, thanks everyone. I got it working now!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users