Category "php"

Problems with Ajax calls on a shared server

I've a web site with one particular page that has worked well for a few years but my host has recently moved me to a new server which is a shared platform. I do

How to capture the razor pay payment modal close event with the below code

`<script src="https://checkout.razorpay.com/v1/checkout.js" data-key="{{ env('RAZOR_KEY') }}" data-amount={{round($combined_order

PHP xpath query with namespaces returns broken nodes

I try to parse wfs xml structures with PHP 8.1 and have the following snippet: <?php $rawContent = file_get_contents('https://www.geobasisdaten.niedersachse

How to pass multiple parameters with Ajax

<select name="docname" class="form-control" id="docname" required> <option Value="">Please Choose Doctor</option> <?php fo

How to change PHP code style in PhpStorm IDE?

I'm using Laravel framework. I want to change the default code style format from this: return [ 'name' => 'required|min:4|string', '

Laravel Blade Component - Pass property with colon in the middle and access from class

I have the following code in a Livewire Component <x-input.color wire:model="foo.name" wire-test="foo.name" /> So I am trying to use a Blade Comp

Laravel join multiple query result

when i run the following query, results are listed multiple. there are 3 records in the table but it lists 5 $adverts = Advert::where("category_id", $category-&

How to deal with mysqli problems? mysqli_fetch_array(): Argument #1 must be of type mysqli_result

In my local/development environment, the MySQLi query is performing OK. However, when I upload it on my web host environment, I get this error: Fatal error: Ca

The POST method is not supported for this route. Supported methods: GET, HEAD for register users. - LARAVEL

Hi guys I saw many times this problem and I solved it but this time I cant see where is the problem, I have been blocked for several days, so I would like someo

How to put multiple parameters in one $ [closed]

Sorry if this is very obvios I have the following $a = 1200.00 $b = 675 $c = 123.00 $d = $a$b$c How would I properly write $d I thought it w

Using this JS function, how can I store in a SQL database TMDB fields?

I'm currently developing a project that will be Client on Java and Admin on PHP. For this purpose, I would like to store the API's data in a SQL database, so th

How to foreach categories from 3rd index from my database / Laravel?

I am issuing a problem with the following: I foreach-ed my categories from index 1 to 3 in my blade file. Code @foreach($categories->take(3) as $category) &l

Apply function to every element of a multidimensional array

I have a multidimensional array like this (please ignore the strlen): array(2) { ["document"]=> array(16) { [0]=> string(14) "Value1"

mongodb & php: how can I store and callback a custom js function to parse data?

Before to submit the doubt that I have, let me start from preamble that I'm definitively a newbie on MongoDB world ;( but I'm going to learn quickly! The goal t

PHP inserts weird symbols instead of polish letters [duplicate]

When i'm inserting data from mysql database using this code it doesn't fill polish letters instead it shows random weird symbols instead of po

Why do I get an error on header redirect?

I am writing a code where I want to check if the user is logged in and, if yes, redirect the user to the profile page. Else, redirect the user to the login page

I need to use a boolean column from my database that is set a 1 or 0 to change the look of one of my articles in my web page

Sorry if the title is a little confusing was trying not to make it too long. I am currently in school and my teacher has tasked us with this "Add a boolean colu

WordPress Loop Post Counter Never Changes

I want to style the first post differently so I am trying to use a simple counter that will add a class to the first post. First, on index.php I have this if (

Got error 'Primary script unknown' with Apache alias outside document root

I've setup an Apache alias on a subdomain, which points to a directory outside the document root like this: Alias / /home/keyhelp/www/webmail/plugins/xcalendar/

What "appropriate source of randomness" in php random_int means?

I was writing some PHP code when I came to an warning in my coding saying "Unhandled Exception" pointing to the use of random_int in some part of my algorithm.