colinh_7 Posted January 29, 2016 Share Posted January 29, 2016 Hello everyone, I'm brand new to PHP and MySQL and I'm trying to build a login/register form for my company's website. I've literally scavenged the internet for the past 3 days and have watched multiple tutorials but still can't get my database to link to the php file(s). If anyone can guide me in the right direction or provide a dummy proof tutorial, it would be greatly appreciated!!! (I would attach my php code but I literally have nothing and have gotten no where) Any advice would help. Thanks! Link to comment Share on other sites More sharing options...
justsomeguy Posted January 29, 2016 Share Posted January 29, 2016 This shows how to connect with both mysqli and PDO: http://www.w3schools.com/php/php_mysql_connect.asp Link to comment Share on other sites More sharing options...
davej Posted January 30, 2016 Share Posted January 30, 2016 As a starting point it is important to use prepared statements. See... http://www.w3schools.com/php/php_mysql_prepared_statements.asp ...and use POST, in the form tutorial beginning here... http://www.w3schools.com/php/php_forms.asp ...but then you need to use SQL such as... SELECT * FROM usertable WHERE userid = ? AND password = ? ...and once you have that simple approach working then you need to look at hashing functions... https://duckduckgo.com/?q=hashing+passwords+php Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now