Jump to content

edit accounts


lee2010

Recommended Posts

hi all, i have a page which lists all of my registered users from the mysql database but i want the ability to edit an account,

 

here is my list users code (just shown the appropiate code and not the rest):

 

<?php

require ('../secure/connect.php');


$sql = "SELECT * FROM users ORDER BY user_level ASC";
$result=mysql_query($sql);

echo '<table width="80%" border="0" cellspacing="5" cellpadding="0">';

echo ' <tr>
    <th><p align="left">User ID:</th>
    <th><p align="left">User Level:</th>
<th><p align="left">Username:</th>
<th><p align="left">User Title:</th>
<th><p align="left">Email:</th>
<th><p align="left">Actions:</th>
  </tr>';

while($rows=mysql_fetch_array($result)){
?>



		<tr>
			<td><?php echo $rows['userid']; ?></td>
			<td><?php echo $rows['user_level']; ?></td>
			<td><?php echo $rows['username']; ?></td>
			<td><?php echo $rows['user_title']; ?></td>
                <td><?php echo $rows['email']; ?></td>
			<td><a href="edit_account.php?id=">Edit Account</a></td>
		</tr>

<?php
	}
?>

 

this lists my users nicely, as you can see i put it a edit account action at the end with a empty id= because that may be a way of doing it but im not sure what else to do or if there is a better way of doing it. any help would be great!

Link to comment
https://forums.phpfreaks.com/topic/229721-edit-accounts/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.