acid.waste Posted November 22, 2010 Share Posted November 22, 2010 Alrite I have a script that creates a new php script for each user, but thats a huge security risk because i have the Username and Password box saved into the php script and checked against the login.php page; I am a total newb with MySQL, but i have the database, but i have no idea what tables to create with fields and datatype etc :3 Also, I dont know how to check the username and password via SQL; Any help would be greatly appreciated Link to comment https://forums.phpfreaks.com/topic/219405-need-help-with-my-loginphp/ Share on other sites More sharing options...
Garethp Posted November 22, 2010 Share Posted November 22, 2010 http://www.w3schools.com/php/php_mysql_intro.asp General tutorial on PHP and MySQL http://php.net/manual/en/function.md5.php Remember to use that to hash your password (You should never be able to go in to the database and see what the password is), though I think MD5 is outdated and has been replaced by something stronger, though I could be wrong http://php.net/manual/en/function.mysql-real-escape-string.php Stop people from injecting SQL into your database (More reading here http://www.tizag.com/mysqlTutorial/mysql-php-sql-injection.php) Link to comment https://forums.phpfreaks.com/topic/219405-need-help-with-my-loginphp/#findComment-1137706 Share on other sites More sharing options...
acid.waste Posted November 22, 2010 Author Share Posted November 22, 2010 http://www.w3schools.com/php/php_mysql_intro.asp General tutorial on PHP and MySQL http://php.net/manual/en/function.md5.php Remember to use that to hash your password (You should never be able to go in to the database and see what the password is), though I think MD5 is outdated and has been replaced by something stronger, though I could be wrong http://php.net/manual/en/function.mysql-real-escape-string.php Stop people from injecting SQL into your database (More reading here http://www.tizag.com/mysqlTutorial/mysql-php-sql-injection.php) Thanks for the reply and links, this helped me alot. Link to comment https://forums.phpfreaks.com/topic/219405-need-help-with-my-loginphp/#findComment-1137713 Share on other sites More sharing options...
Garethp Posted November 22, 2010 Share Posted November 22, 2010 Have fun and good luck Link to comment https://forums.phpfreaks.com/topic/219405-need-help-with-my-loginphp/#findComment-1137714 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.