Crud project with 2 tables

Hello, I used MySql, PHP and PHPMyAdmin for the back end and HTML, CSS and Bootstrap for the front end

Here is an example of the tables I would like to create:

Table User:

  • name

  • email

  • id

Table Car:

  • Services

  • Plate Number

  • id (Foreign key)

Since my table ‘User’ is done, can I ask how can I add the second table so I can read, update and delete it as well using this source code below:

This source code contains the current full code (crud of table user)
https://drive.google.com/drive/folders/1a15Uxvf_eizznCZ-MymqAqnzQTj9_M_w

The same way you did the “user” table. Just do that again.

I keep on getting a lot of errors because I need the both id’s from both table to have a relationship

What’s the relationship between a car and a user?

The relationship vetween users and car is the id

I mean, the business relationship. Does each car have a driver? Several drivers? Passengers?

Sponsor our Newsletter | Privacy Policy | Terms of Service