I am trying to validate if a new user account’s password is matching these criterias: Between 8-30 characters long Contains at least 1 lowercase letter (a-z) Contains at least 1 uppercase letter (A-Z)…
Secure way for PHP REST api?
I am developing the PHP based REST api. I have android app which will send some key parameters to server and the server will respond with the data. In this case, the email is the key element to get all the relevant data. If I want to make it secure, I can save password in sharedPreferences and send it at
How do I open modal using bootstrap 4 by clicking a hyperlinked table cell and populate data in the model from SQL database using the clicked ID
I have a page which displays data from SQL in a table and on that table one cell is hyperlinked and I want a modal (using bootstrap) to open and fetch data using the ID (the hyperlink value) and …
Using functions in Laravel macros
I would like to extend Eloquent Builder to have a support for search function. Inside my service provider I’ve added the following: Builder::macro(‘search’, function (string $searchBy) { … } …
PHP how to convert number (year) to text ex. 1996 = Ninteen Ninty six, and 2004 = Two thousand four
I have a certificate I want to convert year to text but in the given format convertYearToText(1994){ return “Ninteen hundred ninty six”; } convertYearToText(2004){ return “two …
Syntax for multiple “or” statements to set a CSS class
I’m quite new to PHP. The problem statement is, I need to insert a CSS class into the nav on specific pages. Here’s the way I have it now: It works but it feels messy. I’m going to continue to research it (perhaps a switch statement is better?). Is there a cleaner way of doing this? Answer I…
How to convert a grayscale image to pure black and white in php?
I’m trying to convert a grayscale image to pure black and white in PHP using the GD library. The purpose would be to detect the cervical cells within the image. I’ll leave the PHP code and a MatLab one (I wrote this code in MatLab and I’m trying to obtain the same result in PHP). Basically, …
increment value of i is not working properly
I am not able to understand why value of i is not setting to zero and it’s behaving like this st the start of both form value of i is set to zero but not getting the desired out in html form output is showing as result i want should be something like Answer First it should be <?php $i
laravel whereBetween doesn’t check last value (date)
I’ve found out that the laravel whereBetween() doesn’t check the last value(date) I give, or maybe my code is wrong. can you check my code or my assumption is correct? and another solution maybe is …
WordPress Ultimate Member Profile pic Scaled Images
We are using the Ultimate Member plugin and on our members directory page we have the profile images. The default profile image is 190×190 and on upload saves a 80×80 version. On the directory pages it is pulling in the 190×190 image rezising it to 80×80. I want to be able to pull in the 8…