Greetings all! I would like to ask you all for advice with my idea here. And your opinion. The thing is. I have 5 text inputs and many separated divs (options). When I click on div, I want to get …
Tag: php
JS function not found when calling PHP function on server but works on local server
As stated in the title my code works in local but not on server. More precisely, when i call whatever PHP function it doesn’t find my JS function. To sum it up : The goal here is to generate an excel …
Codeigniter: Join between three tables
I’m trying to do a Join between three tables, in which in one table could not be informations to do the join. This my tables: Meetings id docent_id motivation Persons id name surname Companions id meeting_id name surname Now I want to recover the information where Meetings.docent_id = Persons.id (and th…
Problems specifying Laravel Eloquent database at runtime
Laravel 5.8. I am trying to save an Eloquent model, choosing the database connection at runtime: My config/database.php file: My problem is that each time I run this code, the cat is created in the mysql (default) database, rather than the staging database, even when USE_STAGING is true. Answer The problem is…
Why can’t I use a function to simplify my “for loops”
I build a webpage to crack simple MD5 hash of a four digit pin for fun. The method I used was basically try all combination and check against the MD5 value the user has entered. Below is the PHP code I created to accomplish the goal. Debug Output: Notice that in the middle there are four very similar for loop…
ffmpeg real-time encoding while file uploading by chunks
Now the process is: File upload Encode file with ffmpeg when file has been uploaded Can be done at the same time?, obviusly yes, but I don’t know how. The file upload process is by 8MB chunks stored in server, then, temporary I have videofile.ext.tmp that is growing up to final uploaded file. I read abo…
Manually hash (i.e. encode) a string value in Symfony 3.4
Is there a way in Symfony 3.4 to use the password encoder without an entity that implements UserInterface? Details I want to hash a random string value in Symfony 3.4. I can always use password_hash, but I’m trying to do this the Symfony way and take advantage of the framework. Here’s where I̵…
How to get the index of an array of sessions? – cakephp
Friends, I have an array where I need to get the index dynamically to be able to delete the specific session. enter image description here I tried to link the delete button like this in cart.ctp: …
Laravel count Support Tickets from a user [closed]
I have this in the Dashboard Screenshot of the Dashboard I want that it shows how many Tickets are open / closed / all How do I do this with this Database?Screenshot from SELECT * FROM tickets How …
How to generate a random number array and sorting this array using php?
I want to generate 5 random number array and shorting this array using php like the image. I am using this code that generate 1 array. Answer Use this code and take a look at my comments within the code: Now you have 2 arrays having same elements, but one array is sorted: