mikeyc2k wrote:yes i do see the problem here and been trying again to figure this out
The problems start with the first line of what you posted:
$row = $logOptions_accounttype;
Set $row to the account type, yes? But what's the account type? Isn't that precisely what you're wanting to find out?
On to your second line. As it stands, your whole query is pointless:
SELECT accounttype FROM memberstable WHERE accounttype='$logOptions_accounttype'
So if $logOptions_accounttype is "c" the query becomes
SELECT accounttype FROM memberstable WHERE accounttype='c'
So you get from the table all the accounttypes that are equal to "c". In other words, you put "c" in, you get "c" back. Which doesn't gain you very much.
Then things start to get complicated, due to using the same variable for two completely different things and getting $logOptions_accounttype (the account type) mixed up with $logOptions_accounttype (the MySQL query result).
If $logOptions_accounttype isn't even defined you would get (after getting Notices about an undefined variable, if you haven't turned those messages off) a query saying
SELECT accounttype FROM memberstable WHERE accounttype=''
You put an empty string in, and if you get anything back it's going to be an empty string. An empty string is certainly neither "a" nor "b" nor any of those other letters, so none of those "$logOptions_accounttype = 'profile'" statements will run and $logOptions_accounttype would still be a MySQL result set when you try to put it in the URL.
Shouldn't that query perhaps be
SELECT accounttype FROM memberstable WHERE id='$logOptions_id'
Or whatever the appropriate column name is? Not that that is a complete solution by any means, but at least the query is no longer pointless.