I am creating a forgot password feature in my application and when creating my controller, I used this code: But the first line gives an syntax error, unexpected variable “$user”, expecting “function” or “const” error. Does anyone know what I am doing wrong? Answer Make Sur…
Tag: mysql
Laravel : Upload 64base image instead of normal
I have an application using React and Laravel where I’m uploading images. I’m using Laravel Image Intervention package. When testing my API, the upload for a normal image works perfectly. Using React, the user can select an image from his pc and crop it, then he sees the preview as a generated cro…
how to create Dynamic Input value with two different datatype time and text and insert into one single column
I have Dynamic Input box with Time Input and Text Input I want to show as a list items and also wanted to insert values in one column of table in SQL example : 09.30 PM Saturday night journey begins. 01.30 AM We Reach the Base village 02:00 AM Some Yumm, Breakfast! How to add multiple input for list item
Why i am not able to fetch table data in AJAX ? Everytime i fetch req_id from table it’s gives me undefined value in Console.log
I want to take req_id but everytime i fetch req_id from table it’s gives me undefined in Console.log().Please see in table data req_id and yes the databse connection is okay i can see the value.I tried this both GET and POST method but still i get the same error.All i want is fetch req_id and show it in…
Set Max Size to folder for users file manager php mysql
I hope you are well. I am creating a Learning Platform in pure PHP with MySQL and AdminLTE3. I got to the time of creating the file manager for each user and got stuck on the following. I have the following structure in folders: /var/www/html/uploads/users/<% hash (USER ID)%>, and what I’m looking…
select all records and the rest
here is a simple mysqli query to select specific records from my mysql database: The question is: How can I get (best practices) all the other records, which will not be selected with this query filter? Answer Running successive, more or less identical, queries in a loop is fundamentally a bad way to do thing…
PHP mysql Tree Child count and List All Child node level wise
I have a tree like and I want the output for requeted ID for example Admin my table structure is I have a method that returns Child count level wise but I also want to return the child list level-wise with child count level-wise like 2nd image output required. } Answer It sounds like you just want a way of
How to show only those sellers who have created at-least one product
I have one sellers table where sellerid column is sno and I have products table where sellerid is sellerid , I want to get those sellers who are not blocked (there is column named flag in sellers table) and have created at least one product so I write this(or maybe copy this) Now I do my logic through: It is
Problems when using join and pagination together in Laravel
I have some tables in my database and I’m trying to transact between them. My aim is to show the project name and the employees in that project in the form of cards on my projects page as in the image below. (Other than the method I mentioned, if there are better ways to do this, I ask you to
utf8_encode difference between result in SQL and PHP
I’m using utf8_encode to make sure that the input from my users is transforming the special characters to a character where my MYSQL can do a search on. (My database is set in latin1_swedish.ci). When I echo my query, I get a perfect query that I can run against my MYSQL (and I get an result). But when …