Category "php"

Can not upload image into the database in codeigniter

I'm trying to upload a image to the database in codeigniter , but when I write $this->load->model('Upload_model');$id = $this->Upload_model->add_ima

While creating model with factory, migration and resource controller for api inside new repository, conflict encounters in migration as below:

Used Command: make:model Models/Test/TestApi -a Error: root@bb3433d4a92b:/var/www/nt-app-backend# php artisan make:model Models/Test/TestApi -a Model created su

Check password for correctness with php crypt

I have this password in the database: $pbkdf2-sha256$25000$dsvza5WnPh0eldHhp59PiQ$1YUkXJIl6Ek5keGRauKIPmNiIQZEbqA.nD.bJrhtul0 plaintext password is: testtest H

i want to echo this string but its not working [closed]

I intend to echo the string if the string isn't longer than 20 characters. But it's not working even though the string isn't longer than 20 c

PHP foreach loop on unknown depth multidimensional array

I have a multidimensional array consisting of a directory structure or a tree if you want, but how can I loop through this data when I don't know the depth of t

Phpunit @runInSeparateProcess ErrorException: unserialize(): Error at offset 0 of 3 bytes

I am writing a test to check the output(printing the result) of a function, that is changing headers and printing the result. To simplify it look like this: fun

Get associative array after post via ajax

I need to send a form and a array/string to the server. My Ajax looks like this: var formData = $("#formpv").serialize(); $.ajax({ type

Coupon daily time range in WooCommerce

I'm tying to enable the use of coupons to a range of hours in Woocommerce without success. Based on Discount on specific products based on a daily time range in

Uncaught ArgumentCountError: mysqli_stmt::execute() expects exactly 0 arguments, 1 given

I am trying to build a site where I can upload multiple images with php and mysql but I am getting below error: Fatal error: Uncaught ArgumentCountError: mysql

Parsing WSDL: coudln't load from URL only for my current URL in SOAPCLIENT?

I am using SOAPclient in PHP for my integration but after so many tries and so many efforts I am not able to achieve what I was supposed to, Actually I am integ

Strange behaviour in getting Real User IP [closed]

Maybe someone could help me understand, because I m facing something that seems strange for me... maybe for a lake of knowledge arround http r

Get database value based on another input field

I've been searching for this kind of problem and I couldn't find one. I am using ajax to solve this problem but it didn't work out. I really want to have this s

Stylize woocommerce price decimals

I want to stylize the decimals in the price tag and want to delete zero decimals (before 190,00) and it should be (after 190,-) And the decimals after the "," i

how do I create custom WordPress live search?

I have already created a non-live chat search on Wordpress, but I am stuck on how to make a live dropdown search. I aim to achieve this; when one clicks on the

how to fetch specific number of rows (6 rows) from database and get average of those values , then output average to an integer [duplicate]

i am creating php script to take input from a data base containing [id,value,date] , there are many rows (increasing every minute using an api

How to have a fork of a php project still get security checks with owasp dependency check

We use owasp dependency check against a php project using composer. Many of the modules are forked from an upstream repo and into an internal git repo. Since th

how add image upload in TinyMCeditor laravel

i'm trying to upload images in between my blog content but when i select images from the gallery its shoes the error Route[/] not found, even though the route i

PHP header() redirect is working when I serve the page from VS code, but not when I fire the script from a cron job or a Cli

I have a simple PHP script that queries MySQL DB and deletes(unlinks) file(s) from an uploads folder when a condition (expiry timestamp) is met. Then it redirec

2 Forms, Same Method but different task

How can I make 2 forms which has the same method? One is responsible to open editaddresss.php with hidden addresse ID, and the second form (editaddress.php)shou

What causes the data validation error in this Laravel API? [duplicate]

I am working on a registration form with Laravel 8 and Vue 3. The back-end is an API. In the users table migration file I have: class CreateUs