I have stripe check out with php. It creates customers and charges them. I want to create a donation form where if same customer comes back and gives with same email address that Stripe doesn’t create another customer but charges the existing customer with additional payments. Is this possible? Or does …
Tag: php
Deleting rows in callback function in array_walk()
I’m trying to work with array using array_walk() function such way: ‘b1’, ‘n2’ => ‘b2’, ‘n3’ => ‘b3’); array_walk($array, function(&$val, $key) use (&…
Woocommerce – Prevent Adding items from two different categories to cart
I want to prevent users from adding products from different categories into cart at once. Say if the user navigates to another categories and tries to add product to cart, they get the cart cleared out first. Please anybody know how i might approach this? I am a newbie at things like this. Thanks Answer IR…
Call to undefined function imagecreatefromjpeg() and GD enabled
im working on ubuntu 14.04 LTS with PHP 5.5.9 with GD enabled and i doubled check with but still showing me this msg everytime i try to use imagecreatefromjpeg() Fatal error: Call to undefined function imagecreatefromjpeg() in /../library/image.php on line 34 i even tried to check on it from command line by u…
Laravel seeder gives error. Class not found
I’m a newbie in Laravel and and I’m teaching myself how to authenticate from a login table. I have migrated and created the table. Now, I’m trying to seed the data into the login table, but the …
Warning: strpos(): Empty needle in ……wordpress Plugin [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 8 years ago. Improve this question I get…
Remove an element from Json array
I stored my array content in form of json array to database . Format: [“1″,”2″,”3”] Now i retrieved the value from database and tried to remove the third element “2” from same structure. My code …
Deleting files after download in laravel
I’m creating a application that lets a user download a file. After the download i want the file to be deleted. The end of my code is like this: which means that the function ends on the return an i am not able to delete the file. I have tried to call a ‘after’ filter on the route but then
PHP-Converting Comma separated strings into Dot or Symbol separated values for storing in MySql
My current project consist of a MySQL table having 22 fields already. I want to add a new field namely Permanent address. In the front-end, it’s a textarea in which the user will fill the following data with either newlines or comma-separated as per the standard of here. First string will be House name,…
A ViewModel for a Contact Form in Laravel
I am not new to MVC, but I am just getting started with Laravel. In ASP.NET MVC we have ViewModels which is basically a data object that we can pass to the view. The view can then use the ViewModel in …