Hello. I am trying to use spl_autoload_register but it returns an error saying "Uncaught Error: Class 'Functions' not found in..." Here is my code:
spl_autoload_register(function($className) {
$path = "classes/";
$extension = ".php";
$fullPath = $path.$className.$extension...
I am trying to calculate the total leave days based on two dates. I tried using datediff and timestampdiff but it gives me the wrong result.
For example I input:
leaveStart = "2022-04-26"
leaveEnd = "2022-04-27"
So the total leave days should be 2 days because the leave is from 26 to 27...
Uhm, I'm trying to make some sort of inventory system. The products already have barcodes. Now I want to scan those barcodes and the result will reflect on a textbox. Is there a free barcode API that I can integrate? TY.
Hi, I am trying to integrate barcode scanner on my website. Can anyone recommend me some free barcode reader API or something that I can use? I have searched on the internet and most of the results have pricing. Thanks.
I created a view for weekly sales. Everything is working fine on localhost using MySQL.
But when I upload the database on GoDaddy Lag doesn't seem to work.
When I am typing LAG on phpmyadmin, no suggestion is showing. Can anyone help me with this one? Thanks
the structure of vw_sales is...
I recently noticed that my website input validation of prevention of letter typing is not working on mobile. I can freely type anything on the input. While on desktop, it works just fine. What should I do?
function validateNumber(event) {
var key = event ? event.keyCode : event.which;
if...
I am creating messaging process but I encounter problem with marking messages as important/unimportant.
What I am trying to achieve is, if I mark those messages as important, I will append that icon to specific element. And if I mark it again as unimportant, the icon will be removed.
However...
I tried uploading my website on 000webhost but I am getting error "Prepared statements needs to be re-prepared."
I search through the internet and found these two solutions: It happens every time I query through views table.
1. Increase table_definition_cache
- The problem is, 000webhost does...
I am just curious as to why others generate unique strings or ID for transactions or orders when they can just use the primary key in SQL.
Is it recommended to generate id like this 111834039007163223, or is it okay to just use the primary key in SQL generated using auto_incement?
I always see...
Never mind, I have already solved it using this formula:
$new_heigth = 300;
// Resize image
$new_heigth = 300;
$ratio = $original_width / $original_height;
$new_width = ceil($ratio * $new_height);
I created a function that resize an image. But I only want to define the target height and then auto size the width.
For example if I have a 840x360. My target height is 250 and I want to auto compute the width to maintain it's ratio.
So far I can only resize the image based on the resolution...
Thanks for pointing out how it can affect the server, I have not think of that. On the contrary, I am just using this code on admin site, which means only one user is requesting this data. Do you think it'll be okay?
Regardless, Web Sockets and node.js seems like a way to go. I'll be studying...
I created a notification system in my website. In order to get the latest notifications like someone places, paid, or cancelled the order, I created a function and put it inside the setInterval(). My question is, does it somehow affect the performance of the website as it constantly downloading...