Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [php]

PHP is an open-source, multi-paradigm, dynamically-typed, and interpreted scripting language designed initially for server-side web development. Use this tag for questions about programming in the PHP language.

0 votes
0 answers
6 views

how to make the system sort by name

how to make system sort by name using php programming language I want to have a code that will make my system sort by name, the name should follow alphabetically I want my system to have a sort by ...
Mark Andrie Ferrer's user avatar
0 votes
0 answers
9 views

how to display this data with while loop or for loop

I retrieve data with the post method as below $no_wa1= $_POST['no_wa'][0]; $no_wa2= $_POST['no_wa'][1]; $no_wa3= $_POST['no_wa'][2]; then I want to display the data above with a while loop and a for ...
user2175817's user avatar
2 votes
0 answers
14 views

What happens inside stack when you add an additional element to an array in php?

I learned php before learning C and C++. That's why when I found out that the developer must defined the length of an array when defining the array itself, I couldn't understand the underlying purpose ...
Abw's user avatar
  • 33
0 votes
0 answers
6 views

Adding a new item to easyadmin collection field overrides the last one

I have a project using symfony 7 and easyadmin 4. All features worked fine untill I upgraded to the latest Symfony 7 release where editing CollectionFields by adding new elements started behaving ...
user26397158's user avatar
0 votes
0 answers
9 views

How to add custom application for default starter in phprunner

I want to add custom application for default starter in phprunner pro v10. I mean, at the homepage of phprunner which we are going to start our project, I need to add my own custom admin theme as ...
Diaran's user avatar
  • 1
0 votes
0 answers
8 views

Create CSV file with PHP using a WHILE statement with a twist

Data from the table 123 CA 456 FL 33 CA This works: $file_name = "table.csv"; $sql="SELECT filename,state FROM table1"; $result=mysqli_query ($dbc,$sql); $fp = fopen($file_name, '...
cdr1's user avatar
  • 19
1 vote
1 answer
22 views

Converting this preg_replace to match a word with a plus

In PHP I need to highlight multiple given words in a string, for example wrapping found matches inside a <em> tag. But if I have a word ending in + I cannot do it. I understand the below problem ...
adrianTNT's user avatar
  • 3,946
-3 votes
0 answers
13 views

How to list articles from the last 3 days on a page with wordpress function code? [closed]

Please help, we need guidance how to insert / display list of articles from the last 3 days on a page with wordpress function code? i have searched many times but still didn't find the answers ... ...
Nobartv News's user avatar
1 vote
1 answer
22 views

Redirect guests from WooCommerce checkout to My account login and back to checkout once logged in

I use the following code (pasted in my theme functions.php file) to redirect unlogged users from checkout page to WooCommerce My Account login form: add_action( 'template_redirect', '...
Abaol's user avatar
  • 21
0 votes
1 answer
30 views

PHP PDO error - SQLSTATE[HY093]: Invalid parameter number

could someone have a look at my code and help me figure out what is causing the error in my PDO query. The query works fine when I search by "Department", "Datarange", "...
cornacum's user avatar
0 votes
0 answers
10 views

Is there a PHP MSK Client library that supports using IAM roles

trying to use php client to connect to a MSK kafka cluster setup to use IAM roles All code I can find shows the need for a username and password in the SASL config, is there a way to use IAM role ...
Gregg's user avatar
  • 13
0 votes
0 answers
12 views

Laravel Filament Form export to PDF

I want to send an email to the customer after filling up the form, I tried to use Barryvdh\DomPDF for that, I had two functions loadHtml and loadView, I tried this way : controller : <?php ...
NourEddine GACHTOU's user avatar
-1 votes
0 answers
16 views

Connect PhpStorm debugger to Xdebug with Warden

I'm getting an old Magento 1 project up and running, and am hitting issues getting the debugger working. Everything is run on Docker, using Warden to manage the different containers. I've followed the ...
stephenpassero's user avatar
0 votes
0 answers
21 views

Is there a way to tell WordPress to use a page theme as the styling of the login page?

I am needing to make a custom login page for my website but need things that are just unavailable (or not available for free) from any of the login page customization plugins. I have created a page ...
Zane Duncan's user avatar
-1 votes
2 answers
36 views

Display logged in user information

I have got a basic registration and login forms and when the user registers then their information is sent to the database and when the user uses the same username and password then they can login ...
KyleL199's user avatar
0 votes
0 answers
10 views

Uploading from OneDrive/Sharepoint in Laravel App

I'm looking for a solution to allow users to authenticate then upload files from their Sharepoint/OneDrive to S3 within a Laravel application. Has anyone been able to accomplish this before? I've only ...
Abdel Ibrahim's user avatar
-1 votes
0 answers
19 views

How to create coupon/paywall in an Elementor Pro page for FREE [closed]

Is it possible to create a page with a coupon code form, then the selected visitors need to enter the valid coupon code I emailed to them, and if the coupon code they entered is correct, they will be ...
troyds's user avatar
  • 63
1 vote
2 answers
36 views

PHP HTML JS pagination

I have a page which feedbacks which looks like this (I just show 1 comment per page to see if the pagination works fine. Otherwise I'll show more): The feedbacks come from a mysql database and are ...
Andy McRae's user avatar
0 votes
2 answers
22 views

PHP variable from mysql query in form, when null

I have an html form used to edit a record in a mysql table. In the case of editing, I prefill the form with the current values for the record as returned by the query, as below: <INPUT TYPE="...
rdel's user avatar
  • 155
-2 votes
0 answers
19 views

comment résoudre le problème de memoire limité de laravel [closed]

PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 360448 bytes) in D:\ibetaservice\vendor\laravel\framework\src\Illuminate\View\Engines\PhpEngine.php on line 52 ...
IBRAHIMA BAH's user avatar
-3 votes
1 answer
26 views

Laravel maintenence mode timestamp?

Does anyone know an easy way to get a timestamp of when your laravel app is put into maintenance mode? I want to display a message on my view which says "last updated xxxxx"
sgledhill's user avatar
0 votes
0 answers
11 views

Error with Doctrine ORM attribute after converting code from annotation

I am upgrading from PHP7 to PHP8, ran my doctrine entities through Rector to update the annotations to attributes. I'm getting the following error that I cannot get past: Attribute "Doctrine\ORM\...
jeremib's user avatar
  • 741
0 votes
0 answers
17 views

How to sort WooCommerce variable products from max variation price in a custom query

I am trying to sort WooCommerce variable products from maximum variation price (my website contains simple and variable products). My custom query below is sorting products by price, but the issue is ...
Kapil Goyal's user avatar
0 votes
0 answers
15 views

How to allow customers to update their sales channel in admin interface in a Shopware 6 plugin?

I'm working on an e-commerce platform where customers are assigned to sales channels. Currently, this information is stored in the database, but can only be updated through direct database queries. I ...
Auhona's user avatar
  • 125
-3 votes
1 answer
37 views

Including navbars using Php [duplicate]

I've been working on my first ever fully fledged web project to try and learn php, and after copying and pasting my top navbar into the 15-ish pages that I have and the styling for it into the 15ish ...
georges kalouch's user avatar
-1 votes
0 answers
22 views

Laravel is not rendering pages and is way too slow, literally unusable [closed]

I am trying to deploy a laravel app to a ubuntu server, i have installed php, composer, mysql, and apache. I upload the files to /var/www/html and set up the database, but the pages are not loading at ...
isuckatcode's user avatar
0 votes
0 answers
19 views

woocommerce_cart_item_price doesn't update mini cart subtotal

I am adding an array of free gift products to the cart when certain conditions are met. I have used woocommerce_cart_item_price to set the price of the products in the mini cart. However, it is adding ...
Saugat Karki's user avatar
0 votes
1 answer
35 views

Display an Alert When User Session Expires in Laravel

I am using the Laravel framework and would like to create an alert when the session expires. I tried implementing a JavaScript code that checks if the user is logged in every three seconds as follows: ...
Rodrigo Franco's user avatar
0 votes
0 answers
15 views

IMAP Error: EXPUNGE not allowed in session state when creating folder in Laravel

When trying to use the EXPUNGE command after creating folders with the IMAP server, we receive the following error: BAD [ALERT] i.<unique_id> EXPUNGE not allowed in session state The EXPUNGE ...
F-M-A's user avatar
  • 43
0 votes
0 answers
15 views

Filtering by Custom Taxonomy and Meta Fields in WordPress Produces Inconsistent Results

I'm building a custom WordPress theme for a job listing site, and I'm encountering an issue with filtering job listings. My site has custom post types and taxonomies for job categories and job types. ...
kirini maryame's user avatar

15 30 50 per page
1
2 3 4 5
48887