3 ms·
echo "<p>You are logged in as ".$_SESSION['logged_in'].".</p>"; shiver
by there 15y ago
echo "<p>You are logged in as ".$_SESSION['logged_in'].".</p>";
shiver
- pavel_lishin 15y agoHey, maybe we should be giving this guy constructive criticism instead of shivering.
- zackattack 15y agoThe fact that people are shivering in reaction is actually very useful for potential users of this software, though I agree that it's not constructive for the author.
- pavel_lishin 15y agoFair enough on both points - but regarding the first one, will those users actually read these comments? Not particularly likely, I don't think.
- jmathai 15y agoThat's sample code and it uses the easiest data storage readily available. Not sure what the issue is with that. Obviously you'd change it to suit your needs.
- makethetick 15y agoMy point exactly, it's not a polished login system, it's a very basic script you can put on your page to restrict access. You obviously customise it to your needs since every application will be different.
- makethetick 15y ago$_SESSION['logged_in'] is only used there as it was already available to control whether the session is valid or not. There's no point making an API call when the data is already there. Anyway, it's just a quick and dirty way to integrate a Twitter login system, it should be modified to suit.