Skip to content

Laravel On click Event Button [Enable button after upload file]

I have a table which contain two buttons, one is for uploading a file and the other one is for giving score. What I want to do is to give a condition for the second button which is the scoring button, whereby it can’t be clicked (disabled) if there is no file uploaded. How can I achieve this? Here is

I have a 500 error with preg_match syntax

I’m dealing with this php script, which when executed on the host gives a 500 error, apparently the line where the preg_match is is the one that contains the error… this file is going to be executed as a cron to validate. Answer You have extra double quotes in the regular expression. You also have…

Symfony Entites vs CollectionType

I have the following problem with Symfony. I made 3 entities: Customer, Cart, and CartItem. And what I want, is to display all the Products that are inside Cart (These are inside Cart Item), and to be able to change quantity on ever single one with some kind of form. The best way is to use CollectionType, but…

Modal validation using Bootstrap Modal – PHP

PHP Script & Validation: Modal: I don’t know where the problem is, I want the modal to remain open even if the problem or form has been submitted successfully. Now, with this code, if there is a problem with the submit form, the modal shuts down and if we open it again, the user can see error messag…

Create order details shortcode for WooCommerce

Hey I am trying to build a shortcode for my order details on the order received page. The code below will generate the last result and then on top of it, it will display the word Array. My guess is that something in the foreach loop i am creating is still an array, but I dont know what to do

Acessing values from preg_match_all in PHP 7.4

I am trying to access the values from the results of preg_match_all. Below is my coding: Below is the results of ensuring there are values: This my attempt to access the page location, i.e. 465,5400 etc.. I have tried various ways and (3 indices and 4 indices).I always end up with an error message – Arr…