SmItH197 / SteamAuthentication

A simple PHP Authentication that enables steam users to log into their steam account to access content!
MIT License
445 stars 145 forks source link

Page not found on login #11

Closed armageddon08 closed 10 years ago

armageddon08 commented 10 years ago

When i place the code in certain places on my site i get a page not found error when i click the login button. But there are places where i can place the code and it will work.

<?php if(!isset($_SESSION['steamid'])) {

echo "welcome guest! please login \n \n";
steamlogin(); //login button

} else { include ('steamauth/userInfo.php');

//Protected content
echo "Welcome back " . $steamprofile['personaname'] . "</br>";
echo "here is your avatar: </br>" . '<img src="'.$steamprofile['avatarfull'].'" title="" alt="" />'; // Display their avatar!

logoutbutton();

}
?>

SmItH197 commented 10 years ago

Are the pages where it doesn't work in a different folder? As it may be trying to find 'steamauth/steamauth.php' which won't exist in the current directory.

armageddon08 commented 10 years ago

Its on the one page it works in some areas, like a content box with info in it but when i move the code to the navigation bar it wont work

armageddon08 commented 10 years ago

the PHP didn't like the fact that the real name variable wasn't actually anything. Because on the profile there wasn't one set. Anyway, its fixed