Reputation: 9855
Im just wondering if theres a recommended syntax validator out there anybody can recommend?
Having major issues and cant figure it out...
<?php
session_start();
if (isset ($_SESSION['id'])) {header("location: home.php");}
if (array_key_exists("login", $_GET)){$oauth_provider = $_GET['oauth_provider'];
if ($oauth_provider == 'twitter')
{
header("Location: login-twitter.php");
}
else if ($oauth_provider == 'facebook'){
header("Location: login-facebook.php");
}
}
?>
<a href="?login&oauth_provider=twitter">Twitter_Login</a>
<a href="?login&oauth_provider=facebook">Facebook_Login</a>
Upvotes: 0
Views: 1674
Reputation: 7157
php -l
on the command-line will do a syntax check
codepad.org is an easy way to test code online.
Your example code does not contain syntax errors: http://codepad.org/0diycu9o
Upvotes: 4