Category "php"

Getting hidden values on returned ajax results [closed]

I have a shipping estimator I am trying to reset via ajax on any cart change. I have the call and ajax working well on all of the page except

Change "view-order/order-id" url/endpoint in WooCommerce My account - orders to "orders/order-id"

Currently the URL, under the WooCommerce 'My orders' tab, for the button when you view an order in detail is equal to /my-account/view-order/ORDER-ID/ I would l

Remove Klarna Payments with cash on delivery method

I have a problem with a code. So I have five different payment methods in my site. When a customer select "Cash on delivery" as shipment method all the payment

Student Project - Fatal Error: Uncaught Error: Call to a member function prepare() on null in php

I'm working on a student project. I'm building an e-commerce website to sell soaps, and the error message I'm getting is the following. Fatal error: Uncaught E

How to store the image ID and image of a set of shuffling images in array

I'm a newbie and still learning how to code. So, any help is much appreciated. This is what I have in an image of what's done so far. How do I save the selected

sorry - old question again: imagecropauto() not working

I have some simple code: $original_image = imagecreatefromjpeg($image_path); $cropped_image =imagecropauto($original_image , IMG_CROP_THRESHOLD, .5, 16777215);

How to use mysqli connection with SSL

I'm trying to make a secure connection with my database I wrote the following code: <?php // form filled? if (isset($_POST['submit'])) { $user = 'gebrui

How to repeat event for every 2 weeks on multi selection days up to 3 Occurrence's

I'm working on a google calendar kind of repeat feature using angularjs/php. Trying repeat the event for every 2 weeks on multi selection of days and that even

How to repeat event for every 2 weeks on multi selection days upto 3 Occurances (times)

I want to repeat the event for every 2 weeks on multi selection days and that event will be repeat upto 3 occurances(times) from start date. tried below code. p

my $_POST return null but my forms is not empty [closed]

i have two 3 files 1 for the database and the others is for add the data and the index but my adddata.php doesn't catch the value and just ret

Redirect with PHP after ajax call

Im doing the following ajax call: $('#save_sale').click(function() { var save_sale = 1; $.ajax({ type: 'GET', url: 'summary.php',

Symfony how to NOT route public folder

I have a Symfony web app. As per default, all site calls are routed by Symfony. However, when I want to call for example mysite.com/public/example.img and retre

How to use a value from $_POST as the parameter of an in_array function?

I have built an HTML form to search through a .csv and return all entries that match the specific input string. My aim is to be able to search through a .csv an

how to use php and volt parameter together?

I am using Volt and PHP in phalcon volt partial I want to iterate a loop and in the loop I have php code that accept a parameter this is my code {% for header i

Where to find CPANEL object file Path on Localhost and Live server

sorry if my question might sound silly. I am trying to create an email address with Cpanel UAPI with LiveAPI.php but I seem to be lost on some codes. The docume

memory limit exhaused - symfony 5 with flysystem [duplicate]

I try to provide Download Streams for my Project, but always run into memory limit exhausted error on files larger than 128M. php memory limit

htmlpurifier - How to escape self closing tags?

I have noticed that when passing html string to htmlpurifier, it replaces all self closing tags either by open and closing tags or by just open tags example Be

Laravel Json Reponse running really slow

My code suddenly started working really slow. I don;t see any reason, noting was changed or updated. return response()->json([ 'status' => 'su

PHP if result equals this, then replace

I'm calling the 'Referring site URL' in a post array... data34' => $lead->getReferringSiteUrl(), But need to replace it with a friendly name. i.e. If www.

Laravel Carbon difference in time

So I have this table with a start time and an end time and I am calculating hours. This works just fine unless the end time is midnight. I have TIME fields in m