The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Help me echo an individual $row? Reply To: Help me echo an individual $row?


Yes the query I am using is correct for the admin panel because the module is echoing every single user that is admin_level < 1 but I need to make new query now that only echo’s the id that I have clicked on? Not sure exactly how to make a query that will only show one specific users $row['username'] and $row['admin_level'] depending on which user I actually select.

I know $_POST gets the variable that the user actually submits but seeming in my scenario I am trying to get the variable that I click on what kind of php would I use to fetch that in my foreach statement?

Also, forgot to put in this code but this is what is linked to the ‘Change Level’ link in the website which is making me a bit confused as to how to query that I selected a specific user.

foreach ($users as $row) {
    echo '<center>';
    echo '<tr>';
    echo '<td class="info">' . $row['id'] . '</td>';
    echo '<td class="info">' . $row['username'] . '</td>';
    echo '<td class="info">' . $row['email'] . '</td>';
    echo '<td class="info">' . $row['admin_level'] . '<br /><a data-toggle="modal" data-target="#myModal">Change Level</a></td>';
    echo '</tr>';
    echo '</center>';

That code is what also is displaying all of the users that are admin_level 0