Category "php"

how to redirect the user back to desired URL after login page in PHP?

OK. I have a page called plans.php, inside I have three links (Plan 1, Plan 2, Plan 3). Each link has its own page and it redirects to login page (login.php, wh

PHP How to check removed blog in blogspot?

I want to check blog status, active or removed. Active blog: http://novisadcats.blogspot.com/ Removed blog: http://cityofangell.blogspot.com/ Removed blog,

MySQL server has gone away without huge data but due to long time

The script takes too much time and so I am getting this error. I will try to optimize it. I want advice, will using, mysql_pconnect is better than mysql_connect

getting error while enter Command => php artisan route:list

This laravel code is running on my localhost when try to execute any command its throwing below error. please find me a solution why it's throwing such error

php mysql + create a friend request system

i am creating a friend request system that allow user to send request to each other to add as friends like facebook and i have 2 conditions that if : the us

PHP Warning: Module already loaded in Unknown on line 0

On Mac OSX Mavericks using homebrew php55 whenever I run a a php command I get the following error message (everything runs fine it's just annoying) PHP Warnin

deploy with deployer fails

I'm having problem with deploying with the use of deployer, this is the first time i'm using any deployment tool. My teacher have made a guide for making it wor

Laravel csrf token mismatch for ajax POST Request

I am trying to delete data from database via ajax. HTML: @foreach($a as $lis) //some code <a href="#" class="delteadd" id="{{$lis['id']}}">Delete<

Laravel Excel::store file empty after stored

I uploaded this excel file: myExceldocument.xlsx After uploading I want to store in a folder. I used this method: $uploadedFile = $request->file('files')[0]-

AJAX call fails with SyntaxError: Unexpected end of JSON input

Sorry for making a post with a generic error but I just can't figure this out! I have an ajax call that for now sends an empty object and just returns json_enc

Is it possible to re-use an array taken from PHP via JSON in a $.ajax function?

Here is the deal: This area is a preparation for a dynamic chart where I'm opening a new select input when my first select input is selected. With its value(fro

Getting error: CodeIgniter\Database\BaseResult::getResult in CodeIgniter

I am trying to use CodeIgniter 4 crud function findAll and I am getting the error Argument 1 passed to CodeIgniter\Database\BaseResult::getResult() as shown be

Check if a string contain multiple specific words

How to check, if a string contain multiple specific words? I can check single words using following code: $data = "text text text text text text text bad text t

Upgrade PHP on AWS Linux

I have an AWS server running a website with NGINX and PHP. I originally installed these using the following: sudo yum install -y nginx php-fpm The version of

Autoloading classes in PHPUnit using Composer and autoload.php

I have just installed PHPUnit version 3.7.19 by Sebastian Bergmann via Composer and have written a class I would like to unit test. I would like to have all my

How to put php code inside opening and closing shortcodes

I am working on a site and I am using a shortcode in my template files that has an opening and close. I would like to know if its possible to place wordpress th

Laravel post contact form giving me error 419

I've been trying to get a contact form to display as /contact when using the form, and after submitting the form. I'm getting Error 419 no matter what I seem to

TooManyRequestsException with Amazon Product Advertising API

I'm starting to develop a simple Symfony 5 application. It uses Amazon Product Advertising API 5.0 with the paapi5-php-sdk package (provided by TheWirecutter, s

Minimum order amount except for specific shipping method in WooCommerce

In WooCommerce, I use the following code to set a minimum order amount: add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' ); add_action( 'wo

Laravel You requested 1 items, but there are only 0 items available

I am getting row's column randomly to seed database, using eloquent : $physician = SelectOption::where('select_option_group_id', 1)->pluck('name')->rando