Skip to content
Advertisement

PHP submitting a form is destroying my sessions

Hello I am trying to make a form in the page where I created a session so when I submit the form the sessions gets destroyed here is my code: PHP code to start the session : Answer Make sure you have session_start(); at the top of all the PHP scripts So, put the session_start(); at the top of the

unable to get response form an API in Laravel [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 4 months ago. Improve this question I am getting null response in laravel after dd(); ,however in Postman i

WordPress add_filter to element after hook

Is it possible add a filter to a hook after an HTML element thats after the hook? Example Template file: Or is it possible to add an element around the <a id=’logo’></a> ? Like: <div class=”logo_container”><a id=’logo’></a></div> Answer The short answer is “no”. Hooks run at the place that the developer decided to place them. Any code before them, unless

why my variable does not pass in the modal box

good evening I have two sites the first in php and the second in wordpress on the one in php i have a table with links each link opens an article to wordpress the link is in $donnees[“guid”] I did some var_dump of $donnees[“guid”] the results are correct Except when the modal opens It’s always the same value Answer Make

Remove A|B duplicates from associative array in Laravel

I have an associative array containing entries that are virtually the same, except the key-value pairs are swapped: I stored the array in a Laravel collection and tried using ->unique() but the output matches the array feeding in. How can I remove duplicates like this from an array so each pair is unique no matter if the keys are swapped?

Why my dataProvider function in my unit test file is not working properly?

I want to test this function: Inside my unit test file, I have these functions: And finally, I have these errors: Expectation failed for method name is “get” when invoked zero or more times Parameter 0 for invocation IlluminateHttpRequest::get(‘address1′, null): mixed does not match expected value. Failed asserting that two strings are equal. Expected :’address2′ Actual :’address1’ Expectation failed for

Laravel Livewire is including tag twice

I’ve been following the Livewire docs and screencasts to build my new app, but I could be doing something wrong because the <head> tag is been included twice. Here is my code: routesweb.php AppHttpLivewireUserAll.php AppViewComponentsUserLayout.php resourseviewslayoutsuser.blade.php resourseviewslivewireuserall.blade.php If I remove the <x-user-layout> tag in the blade, the problem seems to be fixed, but then livewire doesn’t work. I’ve tried many

Passing 2 parameters in ajax url in Laravel route

I need help, my ajax request doesn’t work if i use 2 parameters in url but if i only use 1 parameter it works perfectly fine. There isn’t error in the first one but i think it does not reach to the controller because the output in response is undefined. this is my view this is my ajax request when

Install php8.1 and librenms on amazon linux 2 with remi’s repository

I install php8.1 following on this website https://computingforgeeks.com/how-to-install-php-8-on-amazon-linux/ librenms on this website https://docs.librenms.org/Installation/Installation-CentOS-7-Nginx/ And it did show the version with this command but it will show “php command not found” on this command after that I wanna install librenms and I follow the instructions on the librenms-documents and type this installation command the error will come out like this If

Advertisement