worldcomingtoanend Posted March 17, 2009 Share Posted March 17, 2009 i am creating an intranet and also a newbie in PHP. I have come up with the script below which I can use to retrieve a list of my users on the intranet. Now how can I code in such a way that when a user enters the username and password my ODBC database gets to authenticate the user and grants or denies access to the intranet. I have no problem creating a login window with username and password but what about integrating the code below with a php script that helps with the authentication. PLiz help <?php $db = odbc_connect("asaas","asas_user","asa") or die ("xxxxxxxxx"); $sql = "SELECT id, username,password FROM logintest"; $res = odbc_exec($db, $sql); while ($row = odbc_fetch_array($res)) { print($row['id'].",".$row['username'].",".$row['password']."\n"); } odbc_free_result($res); odbc_close($db); ?> Link to comment https://forums.phpfreaks.com/topic/149861-php-authentication-on-odbc-database-please-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.