Jump to content

Building a Login with PHP and MySQL...Need Help!


colinh_7
 Share

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...