Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

aaron durber
aaron durber
13,400 Points

adding a new user to mysql using PHP

Hi guys hope your ok, I'm looking at the videos "Using PHP with MySQL" I have been through step by step how to create the shirts 4 mike website along the way I have been changing it to create my own website as I did have knowledge what I needed to do as I have a degree in IT from Staffordshire University!

But while I was at uni in one of the modules when I learned PHP we connected via ADODB.connection so this is why I want to learn mysql and I'm getting the hang of it.

In the videos Randy wants us to create the database where we have to input what shirts the website will be selling, but I want to change that to let users be able to register and log into my website, I have created the web page where users can register I need to create the sql and the PHP can anyone help me with this please as I'm hit a brick wall

Caleb McElroy
Caleb McElroy
Courses Plus Student 12,953 Points

When you say you've created the page where users can register, do you mean you've created the HTML form? And you need helping with implementing the SQL and PHP to register that user to a database and then have them login? Just trying clarifying.

1 Answer

Caleb McElroy
PLUS
Caleb McElroy
Courses Plus Student 12,953 Points

I'm going to assume that you've created the HTML form where users can reigster but haven't started the PHP or SQL programming.

Creating a login/register system can be challenging, you need to implement things like password hashing and working with session variables and cookies. I'm not sure how familiar you are with PHP, but I'm going to link you to a YouTube series on this. I believe this will be the best way for you to grasp it. It's a little to indepth to effectively communicate over a forum.

YouTube Series by PHPAcademy, PHP OOP Login/Register System

Hopefully that will walk you through the process, best of luck!