I want to make an admin section where admins can edit any profile of any user. I have done this using the little article about the <<prev 1 2 3 next >> thing. But i think i dont understand the whole template thing. Well my editprofile page looks like this:
it grabs the logged-in users sessionid and compares it to that of the users in the database, to retrieve that users information to be edited. this works fine for one person.
But then my admin-main-edit page works like this:
it grabs info from the users database not the session database, and I can not figure out how to grab from both using the template.
so i decided that I would simply create a new $variable, use it to determine the user that was called on in the users database, compare that users info to the session database, so that it can simply get the right sessid and then call on the user info like it normally does.
i hope that made sense. at any rate the problem lies here:
PHP Code:
function MatchUp()
{
$changeIt = @mysql_query("SELECT * FROM users WHERE userId ='" . $strMethod . "'") or die ("couldn't do it");
while ($changeRow = mysql_fetch_row($changeIt))
{ $changeIt2 = @mysql_query("SELECT * FROM `session` WHERE username = '" . $changeRow[1] . "'") or die ("couldn't do this");
while ($changeRow2 = mysql_fetch_row($changeIt2))
{ $strMethod2 = $changeRow2[1]; } }
header("Location: index.php?page=editprofile&strMethod=$strMethod2");
but this is returning nothing in my url for $strMethod2. I tried writting this [below] cause i thought it was how it was suppossed to be written:
PHP Code:
("Location: index.php?page=editprofile&strMethod='" . $strMethod2 . "'");
which returned:
index.php?page=editprofile&strMethod=''
it seems to be giving me an empty string for the variable.
i hopes this makes sense. anyone with help would be awesome. thanx.