Category "php"

Go to a precedent page in a php site

I'm creating a simple php program and I'm trying to find a way to be able to go from the page 2 back to the page 1 with a button. I tried by making a button in

PHP array filled by a MySQL query [closed]

I need to fill multiple different arrays by using a MySQL query. This would have up to 16 different arrays. I want to specify each array with

Laravel Store , corrupted or not all are saved on database

public function patient_aprrovedischarge(Request $request, $id) { //get patient details $patientDischarge = DischargedPatients::where('id'

Symfony3.4: Exception occurred while flushing email queue: Expected response code 220 but got an empty response

Project in symfony 3.4 framework, all functions are ready, but an exception to get errors in the process is not working because swiftmailer is not working <p

Laravel Store , corrupted or not all are saved on database

public function patient_aprrovedischarge(Request $request, $id) { //get patient details $patientDischarge = DischargedPatients::where('id'

Laravel says application is in production but APP_ENV is local

My Laravel .env: APP_ENV=local APP_KEY=base64:7HjBWArUX989c8K87678687m2+6786876hs= APP_DEBUG=true APP_URL=http://localhost ... I get the following message if I

Spatie's Laravel Permission and policies don't work together

Excuse my English, it's from a translator. I am using Spatie to control the permissions of my application, for example, each module I have to see, create, updat

Getting an average rating of a TV show using average ratings of its seasons from ratings table (Laravel 9)

I have 3 tables: shows, seasons and ratings. I would like to get average ratings of specific seasons and then make an average of this for every show and sort th

How to make a cookie, that is random, and won't change once the user comes back (can't be PHPSESSID= because im running node.js)

I'm trying to create a cookie that acts like a PHPSESSID but is JavaScript, I would just use PHP but i'm running node so that is impossible. The hope is that yo

401 when fetching Discord channel messages using RestCord

I'm using Restcord ( Restcord.com ) to connect to Discord. I'm using OAuth instead of Bot use RestCord\DiscordClient; $token = $_SESSION['access_token']; $disco

Codeigniter set_checkbox() keeping checked state

I have this code in my view: <input type="checkbox" name="test[]" value="1" <?php echo set_checkbox("test[]", "1") ?> >test1 <input type="chec

RestFul API For Delete And Update Get 403 Forbidden Codeigniter 4

Remember this is codeigniter 4. I need help in here. I am learning to implement about the RestFul API in codeigniter 4. Below is my detail code. Routes : $route

is there a way assign IF statement or Switch Case to a variable

I am trying assign grades for input integers. But I found it difficult to complete the code. Is there any other way to do the below code such that it will give

in csv file data is not in proper format show some html code in cakephp

Data in csv file is not in proper format it show like as javascript code or html code in only one column Code in userscontroller for export data in csvfile from

onclick() event is not working in javascript and span tag

I have written the below code to display textarea in the form but it is not working in javaascript. the real requirement is when i click on reply in span tag a

Eloquent Where using CASE WHEN and withMin()

I have a query like this: Product::withMin('promotions as promotion_price', 'promotion_products.price') ->orderByRaw('CASE WHEN promotion_price IS NULL THE

How to use Oauth2 Provider instead of Oauth1 in Laravel Socialite?

I'm currently developing social listening API with twitter, the flow is logged in user (using basic API Token to send request to the API) are redirected to twit

Strange result in loop when use special chars

I have strange problem when special chars in loop when add br and use specal chars, if don´t use words with special chars no have problems but when use sp

By click of the button the same form is added under that form but how can i get the value of the number of times it getting printed &store it in table

by click of the button the same form is added under that form but how can i get the value of the number of times it getting printed &store it in table. How

How do I remove the links from product names in WooCommerce order emails?

When a customer receives their woocommerce order completed email, there are 2 columns. In the left column is the product name and in the right column is the dow