I’m trying to call a PHP page passing parameters with AJAX. I can see that the page is called, but the $_REQUEST doesn’t take any parameters. If anyone can help me, I’d appreciate it. Thanks! My AJAX is that: In the PHP Page, I have this. Always the answer is failure. Thank you! Answer 1- change your data format in
Tag: request
Symfony6 changing the controller manually using the “kernel.controller” event. How to inject the service container?
The application that I am building is not going to work in a traditional way. All the routes ar going to be stored in the database. And based on the route provided I need to get the correct controller and action to be executed. As I understand this can be achieved using the “kernel.controller” event listener: https://symfony.com/doc/current/reference/events.html#kernel-controller I am trying
My SQL request work in SQL but not in PHP
I’m trying to make an unique request to insert multiple element in my database to not make multiple request. Here is my “generated” request, which work in SQL (tested in PHPMYADMIN). Generated by this code. But I get this error in PHP Do you know why this request does not work when I try to use it with PHP ?
PHP Laravel : $request->hasFile() is not working
I have a form where i get the title,content … and an image. When i dd($requests->all());, It returns the following which is correct. Here is my code for image processing: But the img DB table field gets null. The if($request->hasFile(‘imagePost’)) is not getting the field. What have i done wrong? Answer You are modifying file object before you check it
POST http://localhost:8000/offers-ajax/store 419 (unknown status) Laravel AJAX
I’m a beginner in AJAX and trying to post data form by using AJAX, but this error shows in the console: POST http://localhost:8000/offers-ajax/store 419 (unknown status) I do not know why; I tried a lot but nothing seems to work. I tried to post data without using AJAX queries and it works fine. These are the routes: Controller: blade create
laravel 7 keeps adding ‘/public/’ to my api routes
I am trying to make a php curl request to my laravel api Here’s the curl function function CallAPI($method, $url, $data = false) { $curl = curl_init(); switch ($method) { case &…
My custom message Request validator not work Laravel
I use the Request validation but I don’t get message from request. Look my code and see my mistake. Only important is store function which work good if all fields is fullfiled but if any field not …
How to get query string in Symfony 4
I am trying to access the query string parameters in Symfony 4 namespace AppController; use SymfonyComponentHttpFoundationRequestStack; class Home extends Controller { private $request; …
Merge request not working
I am trying to replace the ‘pic’ value, which is set as an array when it comes in, with an image file name but the merge does not seem to be working. I am not getting any errors in the log with the below code. I guess I am not allowed to embed pictures yet so there is links below.
How can I sanitize laravel Request inputs?
I have MyRequest.php class extending AppHttpRequestsRequest. I want to trim() every input before validation because an e-mail with a space after it does not pass validation. However sanitize() was …