I have a table in the database that looks like this id email 1 user@domain.com 2 user@domain2.com 3 user@domain3.com I have a form that looks like this In the backend I’m trying to match the input email domain with the ones in the database, after “@”. What I’ve tried (if user enters: t…
Verifying an ECDSA P-384 or P-256 signature with PHP 8
I would like to sign the message “hello” on the browser using SubtleCrypto with ECDSA curve P-384 or P-256, then verify the signature on the server with PHP 8. On the browser, I generate a keypair and use it to sign the message: I then send pk_hex and sign_hex to the server. This is what they look…
Symfony 5.2.11: Problem with creating Custom Access Decision Manager
I am trying to create a Custom Access Decision Manager by implementing AccessDecisionManagerInterface on Symfony 5.2. Symfony recognizes the decision manager and instantiate it, but it doesn’t pass Voters array to decision manager. So it can’t collect votes, however the default decision manager wo…
Why is my ftp connection not working in php laravel but is working in FileZilla?
I have a PHP Laravel (5.6) system that I need to connect to an FTP server to upload a single file. The FTP server that I am connecting to is restricting access by ip address, uses port 990, and other than that has a seemingly simple configuration. On my local machine (I’m running on Linux Ubuntu if that…
Is it possible to use a passed parameter several times in Laravel?
I am new to Laravel and I’m developing an application. I’m trying to fetch the data from a database, which works fine, and print them on a screen using a passed parameter to blade, this also works fine. However, when I want to use the same passed parameter for several times, I get the following er…
Array sort by key where keys are clothes sizes (S, M, L, etc.)
I have an array where it’s keys are the sizes and values are either ‘in-stock’ or ‘no-stock’. Example array: I’m trying to sort this by size. Expected output is: I’ve been looking at other similar questions but with no success because those had different array structu…
write in database (php/mySQL)
The problem is very simple (and everything, php and html is on one file(.php)) html part: the result is die(‘formulaire incomplet’);,and nothing is written in the database, i don’t see why. Any clue is welcome! thanks by advance Answer First, use the bound parameters method for all your data…
Always get related model of relationship model in Laravel Eloquent
I have three Eloquent Models: Company, OrdersArea and Localization where a company has many orders areas and orders area always have one localization. I need to getting the Orders Area model to always load with Localization If I do that: I gets Company of logged user without OrdersArea and it’s ok. and …
Script not running and I can’t find out why
I’m new to PHP and HTML, and I’m building a small CMS with those 2 languages. Not sure what I’m missing here, I’m sure it’s beginner level, but for no reason, the script below stopped working, meaning the site won’t load. Here’s the code: The connections.php file is j…
Guzzle query string prameters
I’m having problems writing my request. I need to provide query string parameters to GET method using request(). Since I’m writing tests I can’t edit the method. Right now I have it written like this: Method that gets paginator_data: And thats how query looks if I check the request testing i…