I’ll try to be as clear and concise as possible.
(I’ll preface this issue by saying my PHP isn’t excellent.)
I have a page called userlist.php in which admins are allowed access to change/update values in the database, whether it be email address, password, admin access, or being banned from the site. As of right now, I’m having an issue where one of those options available on userlist.php is being triggered when I load the page.
I’m using mysql_fetch_array to load all of the users on userlist.php. I’m not sure on the rules regarding posting code, so I’ll upload it here: http://pastebin.com/rf5gTUM4
Direct issue: Every time I load userlist.php lines 118-141 are executed without the form being submitted. Every user that is registered has their password changed, but not to any password I’ve chosen, just to some random password.
I believe this is directly caused by lines 124-126 not being above the header, but the problem is that I’m using a variable (np-$rowid) in the request which would be declared afterwords if I did move it and therefore it would be rendered invalid since you can’t call a variable before its been created.
If none of my explanation makes sense, just review my “direct issue” and reference it with my code.
I hope someone can help me.