For a school assignment I’m trying to split stockitems with product details like colour and size in the title into groups of stockitems with different variants. I’ve got as far as having them all …
Using php class for storing and grouping data to each person in array using different IDs
I have SQL exercise where I should convert table data into a print sentence where every person has phone numbers. For example Alice: n1 (person ID here is 1) Alice: n2 (person ID here is 1) Alice: n5 …
Setting General Messages Using Flash Message
I have a simple register form, my form validates but will not show error messages or validation messages This is my form function function validate_new_user() { $errors = []; if (isset($_POST[…
Laravel Transactions Not working when this condition happenes
Let me start with my code On my Controller file this is the code } Notice I am using a service there, The service is nothing but a namespace to manage the code in the service class this what happening Now the issue is when I get some error in the service and I resend the data then suppose the
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…
How to call a PHP function from a processed PHP page with a button click?
There are quite a few examples out there, but I can’t seem to get them to work and they seem overly complex for the simple thing I need to do because the code presented in those examples is far more complex as well. Basically, I have a form that, when submitted, it processes the data in a presentable fo…
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