You assumption is very close to the problem I'm encountering suddenly on the remote server.
To observe the problem more closely, I renamed the each text label separately under every statement. (For instance, Hi= A, B, C, || = D, E, F & Log Out = G, H, I)
It seems that, else if statement is performing it tasks properly. The unexpected text labels appears because of the following else statement in every case.
else {
echo "Hi <a href='userarea2/user2.php' target='_self'>".$row_users['user_name']."</a>";
}
The interesting thing here is that the unexpected text is being printed on the pages (Pages to which session is passed regardless the authenticated users) caused by the above syntax without the database record.
For example, the above syntax should print Hi user || Log Out if really the problem is occurred by it but it prints Hi || Log Out only and it shouldn't actually by any mean since it's clearly defined in the syntax that the whole block of tagged code under each echo statement should be printed at once with all it's functionalities only if the user record is found from the database.
I'm encountering a really funny and illogical problem suddenly.
Thank you,