Thanks for the response Jazzman1! I appreciate it! In regard to pasting in code, I did not think it would be necessary considering what I was asking.
This page is users.php
<section>
<p><a href="new_user.php">Add User</a></a>
</section>
<?php
while ($row = mysql_fetch_assoc($query)){
$id_school = $row['id_school'];
$_SESSION['user'] = $row['id_user'];
$school_query = mysql_query("SELECT name FROM schools WHERE id_school='$id_school'");
$school = mysql_fetch_assoc($school_query);
?>
<section style="width:100%; padding:10px; background:#FFF8DC; border:1px solid #666;">
<h3><a href="#"><?php echo $row['name']. " " . $row['last'];?></a></h3>
<ul>
<li>Username: <strong><?php echo $row['username']; ?></strong> </li>
<li>Email: <strong><?php echo $row['email']; ?> </strong></li>
<li>Details:
<p><?php echo $row['description'] ?></p>
</li>
<li>Privilege Set: <strong><?php echo $row['usergroup'] ?></strong></li>
<li>Associated School: <strong><?php echo $school['name'] ?></strong></li>
</ul>
<p class="button"><a href="user_details.php"> Edit User </a></p>
</section>
This page is user_details.php
$id = $_SESSION['user'];
$query = mysql_query("SELECT username, name, email, id_user, school, usergroup, description FROM users WHERE id_user='$id'");
$row = mysql_fetch_array($query) or die(mysql_error());
The $_SESSION['user']; only returns the ID from the last row in users.php. I need it to store the ID of the user I click to show details.
The details page will allow a user to edit information for the user they choose.
I know why it's only showing the last ID, and that is because the variable gets overwritten each iteration of the loop. I don't want to pass the ID in the URL, because then someone could just change the number and view users they are not authorized to view.
Again, thank you for the help!