Skip to content

Tag: php

Why doesn’t this get function receive the variable car?

*quick_searches.php This code items that similar to a search done on a previous page. Then is supposed to save the specific brand listed to car. test.php This section of code is supposed to get car = ‘.$row[‘brand’].’ from quick_searches.php and display it. Answer So your URL has space…

Why you shouldn’t be using GET request? 3 options [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year. Improve this question We covered all these POST and GET requests topics in college but those three…

How to automatically number each row in a table in laravel?

Please I want to automatically number each row when data is displayed from the database. Something like this so each row is numbered in ascending order from 1 to n depending on the data available in the database. How do I properly do that. Any Help please am new in laravel Answer If you are using blade, the l…

place results of each foreach objects into their own columns

I have an array of objects that I am getting values for using foreach: If I ECHO this, I get results like: The mysql is Great! Now since they are objects, if I wanted to get a count on each variation of the type and display that in a table how would I do that? I have tried adding things

Can you send text and file for the same param?

I am trying to send a request to my PHP Laravel API that would store as “content” both files and text, however when i send the POST request, only the file path gets saved in the database and the request returns an array that is empty, is the problem from postman or my API? Here is the code for my

Laravel, store multiple variables from array into DB

Im not sure if the question title is correct but what I wanna do is clear in the example below I have 3 arrays and I want to store data in one table the table structure is like this table name: tour_transports id transport_id transport_track transport_note arrays coming from blade so as you see the ids are 1 …