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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.