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

Simple PHP registration form with database

Can you help me, how to create simple registration form with php and mysql? Or give me link of the video. Thanks

7 Answers

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

George;

I did a quick Google search for "PHP registration form" and got several good options. Unfortunately, I don't recall seeing any registration form lessons in PHP here on Treehouse. There are a few topics of PHP forms, but mostly related to Contact Us type of forms.

Ken

Thanks Ken :)

Ken can you help me to solve this problem?

Ken Alger
Ken Alger
Treehouse Teacher

George;

What type of registration are you wanting? Registration for a secured site, i.e. log-in to gain access or registration for information distribution, i.e. register for an email list?

Ken

Registration for secured site.

Ken Alger
Ken Alger
Treehouse Teacher

George;

Creating registration for a secured site is certainly doable from a coding standpoint. Like I mentioned earlier, I have not seen a PHP implementation tutorial here on Treehouse. There are several several things your site should work to attempt to prevent including:

  • SQL Injections
  • Session Hijacking
  • Network Eavesdropping
  • Cross Site Scripting
  • Brute Force Attacks

The basic steps for creating your registration form, database, etc. are:

  1. Configure Your Server
  2. Configure the MySQL Database
  3. Create Database Connection Page
  4. Create the PHP Functions
  5. Create Processing Pages
  6. Create Javascript Files
  7. Create HTML Pages
  8. Protecting Pages

Probably too much for a forum discussion though.

Ken

Ken Alger
Ken Alger
Treehouse Teacher

Have you thought about using an open source CMS/e-commerce/blog site for your project? Many of them have site security either built-in or have fairly easy to setup site security.

I'm trying to write my own CMS :)

Ken Alger
Ken Alger
Treehouse Teacher

Ah. Well that is quite the ambitious project then. Probably need to take the major discussion(s) of the project off the forum. Is the registration your last piece of the puzzle?

Ken

Thanks for advice

No actually it's first step. But I think, I should go through these all courses to start my project.

Ken Alger
Ken Alger
Treehouse Teacher

George;

If you are not familiar with PHP/MySQL I would strongly suggest you work your way through the PHP Development Track prior to launching into building your own CMS. After that taking a look at Laravel Basics would be a great start at learning what a PHP framework can do.

If I were to sit down and write a CMS project I would definitely look at using a framework, such as Laravel (I'm partial to that one), to build it. It does a lot of the heavy lifting of the MVC model functions. Saves a lot of time while still giving the developer the flexibility to create their own system.

Ken