I am trying to make a ranks page for my online gaming clan but can't find out how to do it. So im asking for a bit of help.
1) This is an input array
2) Im trying to have it were i can edit all the users and i hit 'Edit Members' and it updates the db with the info i just added.
- Code: Select all
if (isset($_POST['update_members'])) { $sql = sprintf("UPDATE users SET crank = '%s' WHERE id= '%s'", mysql_real_escape_string($cl_rank), mysql_real_escape_string($u_id)); mysql_query($sql) or die("SQL error : ".mysql_error()); echo "<div class=\"warning\">updated</div>"; } <input type="hidden" name="user_id[]" value="'.$rows['id'].'" /> <select name="ranks[]"> <option value="1">Member</option> <option value="24">Admin</option> </select> <input type="submit" value="edit members" name="update_members" />
