O'Reilly logo

PHP & MySQL: Novice to Ninja, 6th Edition by Kevin Yank, Tom Butler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10: Allowing Users to Register Accounts

Now that we’ve done all the hard work of building an extensible framework, it’s time to add some new functionality to the website. We’re going to make it so that users can register accounts on the website with a view to letting them post jokes themselves.

You should already have the table for authors in the database with some data you added via MySQL Workbench. If you don’t, you can execute this query to create the table:

CREATE TABLE author (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255),
email VARCHAR(255)
) DEFAULT CHARACTER SET utf8mb4 ENGINE=InnoDB
                

Don’t worry about adding any records if you have none. We’ll be creating a form that lets us add authors from the website.

The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required