Sunday, 15 September 2013

Why a button isn't being shown even when php doesn't corrupt it

Why a button isn't being shown even when php doesn't corrupt it

<?php
require 'openid.php';
try
{
# Change 'localhost' to your domain name.
$openid = new LightOpenID('localhost');
if(!$openid->mode)
{
if(isset($_GET['login']))
{
$openid->identity = 'https://www.google.com/accounts/o8/id';
header('Location: ' . $openid->authUrl());
}
?>
<form action="?login" method="post">
<button>Login with Google</button>
</form>
<?php
}
elseif($openid->mode == 'cancel')
{
echo 'User has canceled authentication!';
}
else
{
echo 'User ' . ($openid->validate() ? $openid->identity . ' has '
: 'has not ') . 'logged in.';
}
}
catch(ErrorException $e)
{
echo $e->getMessage();
}
This question was asked but a big part wasn't answered due lack of testing
, the question is that why doesn't the login with google button be shown
after a login note : this is openid and will be redirected to google after
its shown and back to the page after logging to google but it doesn't show
the button after the login, reason ? for testing I have uploaded in
http://dota2tradebots.com/googlelogin.php

No comments:

Post a Comment