You know I was slightly looking forward to this video after seeing the last one!
Looks really interesting seeing the project come to life! It always amazes me when people manage to make code look good in a video, if done wrong that can get boring quickly but you make it understandable enough (I think)!
That said I'll have to critizise something about your server side:
(I know everything written in PHP, especially such a small app for a one time jam is just one huge bodge but as it's in a video and on a public server I feel like I should at least point this out)
View attachment 20532
This is prone to
SQL Injection Attacks, allowing someone to get the entire table and if you set up permissions poorly even the entire database.
Instead, use a prepared statement:
PHP:
$stmt = $conn->prepare("INSERT INTO MyGuests (firstname, lastname, email) VALUES (?, ?, ?)");
$stmt->bind_param("sss", $firstname, $lastname, $email);
This makes the code 1. more readable and 2. safe from SQL Injections by sanitizing the values.
I'd also recommend you put your database credentials into a config file so you can a. reuse them and b. show your request handlers in a video without showing off your password. (If you want this part deleted so noone finds out let me know through a report
)