Use Stack Overflow for Teams at work to find answers in a private and secure environment. Get your first 10 users free. .

Questions tagged [php]

PHP (PHP: Hypertext Preprocessor) is a widely used, high-level, dynamic, object-oriented and interpreted scripting language primarily designed for server-side web development.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

text under order details table with condition

I want to add a text under the order details table in the my account page as shown in the screenshot below but i want this text to be changed to another text if the order status is changed to complete....
-5
votes
0answers
16 views

Laravel: retrieve from db where column has boolean which equals true

So basically I have a table which is named 'Tasks' and it has a boolean value which is named 'favorited'. I'd like to have $taskfav be equal to all rows in the db where favorited = true/1 Laravel 6
-2
votes
0answers
11 views

Problem with DateRangePicker by kartik in Yii2 framework

That is my index.php file and the part with the DateRangePicker widget. [ attribute' => 'data_start', 'format' => 'raw', 'value' => 'data_start', 'filter' =>DateRangePicker::widget([ ...
0
votes
2answers
29 views

Get random 8 images from directory for my game using JQuery

I have developed a memory game from a set of images using JS and PHP and everything works fine. Now I'd like to expand this work and get images from the directory for the game. JS code : for (i = 0; ...
1
vote
0answers
7 views

Google Shopping Content returnrefundlineitem API

https://www.googleapis.com/content/v2.1sandbox/myid/orders/orderid/returnRefundLineItemresulted in a400 Bad Request` response: { "error": { "errors": [ { "domain": "content.ContentErrorDomain", "...
0
votes
0answers
16 views

How to build a quaternary relationship in laravel 6?

I have to create a relationship between this tables: As you can see, I need to relate 4 tables creating a quaternary relationship, asuming that the database model is ok, how i can do the relationship ...
-4
votes
0answers
34 views

how to remove key from array in response [on hold]

generate array like this { "success": true, "data": { "0": { "account": "mp", "current-charge": "CI$ 215.38", }, "2": { "account": "Patel 2", "...
0
votes
0answers
13 views

Why there is index.php and .htaccess into all Prestashop subfolder?

In pratically each sub folder of Prestashop, you can found an index.php file that contains : <?php header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: ".gmdate("D, d M ...
-1
votes
1answer
16 views

uploading multiple pics to database using php

i have a code that i can upload a single image to database using php i have a code that i can upload a single image to database using php here is the php code, <?php include "database.php"; ...
-1
votes
0answers
32 views

Why PHP Return JSON With “&quot;”?

I am working with WSDL for my web services. So, I created a WSDL page and add a function. This function is, connect my table and return JSON value. When I call this function other PHP page, I take ...
-1
votes
1answer
26 views

Ajax file Upload giving the undefined index file from the php side

I've tried everything i came across and i am sure there is something i dont have in the code .Please i need some help thks. This is the html which is a form with one input which should receive the ...
-4
votes
0answers
21 views

How to show chart after click in search box in website? [on hold]

I had a search box on other web page and I'm just trying to use it in order to filter the data shown in a chart in another one. The search box is working and passing the variable to php to retrieve ...
-2
votes
1answer
31 views

php multi dimensional array unique [duplicate]

I am facing Problem with removing the duplicate value from the multidimensional array. Array ( [524] => Array ( [0] => 526 [1] => 530 [2] =&...
0
votes
0answers
9 views

PDO/Sqlite3 working via commandline, but not through web interface [duplicate]

So I have the issue that the code I am running is working fine when I run it through command line, but not through the web interface. I would guess it has something to do with permissions, but I am ...
0
votes
0answers
11 views

Force Safari to use mobile view by default for website in iOS 13 by using Javascript

I want Safari use mobile version view by default instead of clicking "Request mobile website" on Aa menu. Can i do it by using Javascript or PHP.
0
votes
0answers
18 views

How to stop force Save As dialog box

Problem Trying to load avi / media file (audio / video) in iframe. But it is giving a Save As dialog box, also the media file is not loading and running in iframe. Technologies used PHP MySQL ...
-1
votes
0answers
25 views

Angular with PHP [on hold]

I want to learn angular with PHP Kindly suggest something.I have tried many to learn from many tutorials but i have not find any sufficient material to understand or enhance my learning.
0
votes
0answers
12 views

fedex free shipping showing wrong price admin order magento 2

As I am using FedEx shipping method. I selected FedEx Ground as free shipping. I am also using avatax for tax on a specific region. As my point is when I am trying to create order from admin ...
-3
votes
2answers
37 views

Mysqli query not working facing unknown error [duplicate]

Here is my query and it is not working properly. $query=mysqli_query($conn,"INSERT INTO 'my_users' (`username`,`password`)VALUES ($username,$password)"); I ensure that my_users is a table data ...
0
votes
2answers
22 views

PHP + Slim PHP Framework: How to dynamically add stylesheets to the document head?

I have created a simple slim application with a login form, dashboard, registration page and account page. Each page has its own route. All the pages use the same header and footer, which is included ...
0
votes
1answer
15 views

PHP WP For create two posts when theres only one wp_insert_post?

I have this one function that duplicates posts from x date to x date if the administrator accepts the request. All that works. However, instead of getting one post for each run in a FOR function, I am ...
0
votes
0answers
11 views

Build realtime Web application with php and rethinkdb

I'm setting up Rethinkdb with PHP.But changes are not visible in real time. This is my first page,First page inserts data to the table. require_once("rdb/rdb.php"); $conn = r\connect('localhost'); ...
-2
votes
0answers
28 views

Calling function inside a function in PHP [duplicate]

I create a function to get keys from another function, because i don't want to mention in every functions. i googled but i found nothing. if i store the keys at one place so i can change whenever i ...
-1
votes
0answers
9 views

ccavenue payment gateway request-handler not redirecting to ccavenue-payment-gateway

ccavenue payment gateway request-handler not redirecting to ccavenue-payment-gateway.. I have setup ccAvenue request-handler form with required hidden-parameters, but its not redirecting to ccAvenue ...
-2
votes
0answers
24 views

lossy compression of PNG in PHP without installing anything on the server

I need to reduce the size of the PNG file using PHP without installing anything on the server (because I'm using a shared hosting, so I can't install anything). I already do the resizing of the ...
-1
votes
0answers
17 views

Generate PDF with KnpSnappy

I need to create pdf but I have a problem with breaking it into more than one page. In one of my page I have foreach statment which can output a lot of data, sometimes it doesn't fit on single page ...
0
votes
0answers
15 views

PHP SoapClient does not work with basic authentication

I am having trouble with accessing a 3rd party SOAP service using PHP SoapClient. The service requires basic authentication and despite providing the username and password, I always get an "...
0
votes
0answers
14 views

Drupal Module not Executing PHP code but rendering text

I am using a simple Drupal 8 Module to execute some PHP. I understand that PHP-Filter is a no-no now. My problem is that I cannot see how to execute PHP rather than simply render text. <?php ...
0
votes
0answers
41 views

Validating 2 form array inputs, so that their sum is equal to 100%

I have a page where I am building a table of values for editing, and then also incorporating new rows, which I have encapsulated into a single form. Both the existing table rows (percent_owned[]) ...
-1
votes
0answers
10 views

How to parsing string of shopify pagination link according new pagination update?

I Have one string which contains the link of prev and next page link: Link: "<https://{shop}.myshopify.com/admin/api/{version}/products.json?page_info={next_page_info}&limit={limit}>; rel={...
-3
votes
0answers
14 views

Script to rename index.html.bak.bak and removing index.php

such a great community there. Well I'm facing the index.html.bak.bak malware that infect all my websites and cpanel also for sure, however I want a cronjob script to rename the index.html.bak.bak to ...
1
vote
1answer
21 views

Odoo updating or creating nested array with Web Service API (PHP)

I'm trying to update and create a record with odoo web services using this package https://github.com/robroypt/odoo-client. But it isn't working with nested array $data = [ 'name' => 'from ...
0
votes
0answers
18 views

DataTables - multiple tables with individual search inputs in serverSide mode

Application is using: DataTables 1.10.18 jquery 3.2.1 PHP backend (specifically CakePHP 3.7) lodash 4.17.4 The application contains a web page which consists of multiple DataTables. Each of these ...
-1
votes
0answers
10 views

Adjusting excel row height to output text

I'm using Laravel-excel(which is built upon Phpspreadsheet) to output an excel based on a table on a view. The data comes from the database, so there's a few "for each" in there to output the data I ...
0
votes
0answers
20 views

I cant upload files

I made a site, and I wand to upload files through a php form, but when I try to do so, I have the following error:405 Not Allowed nginx. Can anyone help me? I have checked my php.ini file, and ...
0
votes
0answers
16 views

Unsupported operand types error when code is included by function using global variables

I have a piece of code that work fine if I use the INCLUDE instruction of PHP. However, if inclusion is performed WITHIN another function, I get error UNSUPPORTED OPERAND TYPES on last line of ...
0
votes
0answers
27 views

Image uploads, the next day it fails to upload

I've followed this tutorial https://www.w3schools.com/php/php_file_upload.asp to upload an image. This works and the image is in the directory. I can then delete it from the directory, run the code ...
0
votes
0answers
32 views

file_get_contents: FileName can't be empty (Laravel, Vue.js-Axios)

I am making file upload from vue.js to laravel api. onFilePicked (e) { const files = e.target.files const fr = new FileReader () fr.readAsDataURL(files[0]) fr.addEventListener('load', () =...
-1
votes
1answer
17 views

How can I push my htdocs/workspace repository to GitHub?

How I can push Github my /htdocs? why I want to manage my htdocs repository by github for php study. what I did added remote url of kaede0902/php to htdocs/workspace, and tried to pull. I used ...
1
vote
0answers
27 views

Not able to login on using laravel

I have created a login page using laravel 5.5 using command php artisan make:auth even after entering correct credentials. i am unable to login. It redirects me to login page. Table structure ...
0
votes
0answers
15 views

How to upload file with http put in php

I need to upload image with http put method to the service. But I did not succeed.My code is as follows. curl_setopt($curl, CURLOPT_URL, 'url'); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT'); if(...
0
votes
1answer
12 views

How to Upload PHP page to Cpanel & how can we access it

I want to upload PHP Page in Cpanel How can i upload the page to the Cpanel and how can i access it. I tried using Cpanel file manager for uploading the same
0
votes
0answers
24 views

php equivalent for mcrypt_decrypt in javascript?

I am using following code in php mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $secretKey, $str, MCRYPT_MODE_CBC, $vector); In javascript it does not return similar output as php I have used the code: var ...
0
votes
2answers
29 views

Trying to get property 'service_type' of non-object in laravel it is not an array

I am getting error Trying to get property 'service_type' of non-object in laravel controller $services= Service::pluck('service_type', 'service_id'); return view('package', compact('services')); ...
0
votes
1answer
30 views

Html Model Box not work loop in laravel view

I want to show texts in web-page using loop with html Modal Box.texts saved in database.I am using laravel framework.only show modal box for first item, maybe it can be JavaScript not loading problem. ...
0
votes
0answers
40 views

Get the favicon or logo of the site using PHP [duplicate]

So I'm using php file_get_contents("".$result['href'][0].""); to get the link content and get the title of the website using preg_match("/\(.*)\</title>/i",$str,$title); ` . So the thing I want to ...
0
votes
0answers
20 views

multiple authentication validation is not working

i have two guards "customer" & "adminuser". In the admin login login page, validation rules are not working in logincontroller. i have checkRole middleware for admin user. why is this not working. ...
-1
votes
0answers
11 views

Creating magento 2 event on clicking create account button while creating new customer account

I want to create event such that after clicking create an account in magento 2 customer registration, it should show pop up with some input textfield in html. How should I do that?
0
votes
0answers
7 views

Secondary routes work while navigating in a heroku app singe page application but it fails on page reload

I have a web app deployed on heroku of similar name - https://x-y-z.herokuapp.com. The web app is a single page app and uses PWA router and has routes similar to https://x-y-z.herokuapp.com/abc When ...
1
vote
1answer
40 views

How to pass bash script variable value in PHP command (CLI)

I need help in passing the Linux bash-script variable to execute the PHP CLI command. I am working on the bash-script that executes PHP CLI command that gets input variable from the bash-script like ...