So I was wondering how to detect the right files, by their names, when I scan through them. Right now when I open a pop-up window, I GET a id (?id=2451961), and this id is used to detect image files in a folder. But how should i detect them? Is there a way to say, the start of the files
How to use model equilevent normal php file => file.php without blade
If status is successful how do I use model in normal php file without using blade.If you can help with this issue, I’m very home. When the file is a blade, it cannot be accessed from outside. i need to store it in php extension.Because this file asynchronously receives post array from outside Model File…
Calling class method in jquery
Hey im trying to build a simple inventory program. I have class like this : now i want to append rows in my table which contain select option like this: but new row wont added if call my class using normal php line. It does however add a new row if i remove the php line. So, how can i
Add domain to src attribute value if a relative path
I have a text variable which contains multiple images with a relative or absolute path. I need to check if the src attribute starts with http or https then ignore it, but in case it starts with / or something like abc/ then prepend a base url. I tried like below: My output is: Issue here: I got 99% result
I want to run daily php file with html and js content crontab
I am new to this topic and I have developed a .php file, which has an html code inside, which makes a series of functions through javascript and this through ajax, executes a php code, which registers data in the database, the code works correctly, when opening the url, internally it does the whole process. B…
Select a record when the timestamp has passed by a certain amount of time MYSQL/PHP
I’m trying to select sessions that are younger than 6 hours old with this query like so: The problem is that the query condition is always false and never manages to find the sessions even when a record actually has a timeStamp of a few seconds ago. obviously I am very sure that the problem is in the co…
Order mySQL query by year with several year specifications
I am using this query to pull out article entries from my database: With single year specifications, the query orders the entries by year as intended: Problematic is that this older database uses several publishing years in the same table cell, looking like this: Example: 1970, 1974, 1983 or sometimes with se…
Error when using “parse_str” … Undefined index: query
I am trying to get the current page URL, which may look something like this: http://www.example.com/login.php/?redirect=myprofile.php …and then get everything after the “redirect”. Here is my code so far: However, I keep getting an error if the index query does not exists in the array: Notic…
PHP cURL error: SSL certificate problem: self signed certificate
Long story short, I had to reinstall php 7.4 on my Mac. I have a php webapp that hits a .NET API. Prior to the reinstall of php, I was able to hit a locally running version of my API at https://localhost:5001 using cURL in php but now I get a response code of 0 with this error: If I
How to process insane date inputs with php
I have a code in php for processing the personal details of a person. I need code to handle the date input such that when the user inputs a year like 1900 and below then the program outputs That is impossible. I have successfully handled how the program should respond if the date input is in the future. The p…