Skip to content

Validation to check no existing overlaps with previous bookings

I need to validate that a booking doesn’t overlap in date and time with an existing booking and return and error if a booking is overlapping an existing booking. This is the code I have right now but it isn’t working, and when I make another booking that overlaps an existing booking, it is still p…

PHP: How to play random mp4 videos in static url .php

I have a code in PHP language hosted in webcindario.com (free hosting), that shows on click a video randomly. But it works ONLY in VLC Player for Windows. The result is that the Chrome browser or Android don´t show the video: And I have these questions: Is there a way to get the code to work on Android device…

Get Count For A Set Of Fetched Field Values – MySQL / PHP

I have some data returned from a MySQL database that outputs the post details for a particular user. I’d like to output a count for the number of images (represented below by the $db_image_filename value). How do I get a count for the number of field values in a column? I thought I could use PHP’s…

Fatal error “compatible with PDO::query” in new PHP8

I have a Sql class that was working perfectly fine until PHP7. Now, using PHP8, I get the error shown below. Fatal error: Declaration of DBSql::query($query, $parameters = []) must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed …$fetchModeArgs) in C:xampppageclassDBSql.php on…

Change Message-ID PHPMailer

Hello I am making a php based mailing application that will connect with a external smtp server and send emails. Now I have managed to match everything but the Message-ID’s @domain-name and Sender domain name are not matching… This is the result I am getting : Wrong Message ID Header and this is t…

PHP SQL Query to get the most common value in the table

I’m trying to have my query count the rows and have it return the most common name in that list, then from that it counts how many times that name appears and outputs the name and the amount of times its there This is the code I’m using: However, it just displays the first username in the table an…

Prestashop 1.7 module front controller 404

I am developing a Prestashop 1.7 module and I have a problem with the Front Controller Module. When I try to access the page I get a 404 error. Here are the files : modules/cbd_calculator/cbd_calculator.php modules/cbd_calculator/controller/front/display.php : modules/cbd_calculator/views/templates/front/disp…