Skip to content
Advertisement

Own booking script

I’m making my own booking system and the main script that denies storing data in DB is not working. The script itself:

JavaScript

And I have this Schema of DB

JavaScript

And I even have routes but I don’t think that there s any problems with them

JavaScript

I can show the model too

JavaScript

The script that I marked as main just always display me I won’t let you do this >:(

I need when one visiter has booked some date this date will be blocked from booking

Advertisement

Answer

The line:

JavaScript

Looks very suspicious; should that be something like:

JavaScript

You want to refuse to book if either date is not empty.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement