print "</pre>"; } else { print "<hr />"; print "<h3>Complete user data</h3>"; echo '<pre style="font-weight:bold;font-size:16px">'; print_r($data); echo '</pre>'; } print "<hr />"; print '<form method="POST" action="index.php"><input type="submit" name="run_tests" value="Run POST/GET/DELETE tests" /><br />This will post a test message to your stream under your name, fetch it, then delete it.</form>'; print "<hr />"; echo '<h2><a href="signout.php">Sign out</a></h2>'; echo '</div></body>'; // otherwise prompt to sign in } else { $url = $app->getAuthUrl(); echo '<a href="' . $url . '"><h2>Sign in using App.net</h2></a>'; if (isset($_SESSION['rem'])) { echo 'Remember me <input type="checkbox" id="rem" value="1" checked/>'; } else { echo 'Remember me <input type="checkbox" id="rem" value="2" />'; } ?> <script> document.getElementById('rem').onclick = function(e){ if (document.getElementById('rem').value=='1') { window.location='?rem=2'; } else { window.location='?rem=1'; }; }