Hi there,
I have been searching everywhere to try and perfect this form. Originally I could register, but not update a user. Now I can update a user but not register. I cannot remember exactly what I changed to achieve that, but here’s the code I have now:
[code]
Create a new user
<?php
require '../connect.php';
?>
Username:
Password:
Password Again:
Admin?
//Just in case (according to a tutorial I read, this is a necessary failsafe)
Password:
Password Again:
Admin?
//Just in case (according to a tutorial I read, this is a necessary failsafe)
Update an existing user
Username:
<?php
$result = mysql_query("SELECT * FROM users"); //Load User List
while ($row = mysql_fetch_array($result)) {
$username = $row['username'];
$displayOpt .="$username";//Load each user
}
echo $displayOpt;//Dispaly each user as a dropdown option.
?>
Password:
Password Again:
Delete? Warning, this will permanently delete the user account!
//Just in case (according to a tutorial I read, this is a necessary failsafe)
Password:
Password Again:
Delete? Warning, this will permanently delete the user account!
//Just in case (according to a tutorial I read, this is a necessary failsafe)
Is anyone able to point out what I’m obviously forgetting?