I am doing a password manager web app (like LastPass etc), one of the things that has occurred to me is that after using PHP to retrieve the passwords from a db and decrypting them and then using JS to display them in the UI, the variables containing their passwords are visible if someone looks at the source …
PHP: Best way to “explode” string based on regex / find elements between regex maches
Lets say I have a string such as: How can I split it up so that the end result would be: I can get one or the other separately fairly easily using regex, but is there a good way to get the numbers using regex and then get “the rest” into another variable without writing explicit regex for it? The
php run command line and pipe std err to variable
I am trying to figure out how to run a command line program within php and output both stout and stderr to a variable. All the examples either output the command line directly to the screen, or only output stdout for example will output the following directly to the screen and not store anything in $data And …
Is this a secure way of connecting to an SQL server?
Suppose I have a .php script on my server which interacts with a MySQL server. Part of it is: This script is solely server-side, and something like DevTools or view-source://web.address will not show the source code. However, it is really important that nobody is able to see this source code because it bears …
Get date-time value instead of default dd/mm/yyyy –:– — on Edit
I have created a bootstrap Modal from which I am taking Debt information, now on debt creation, I don’t have a problem with dd/mm/yyyy –:– — as default (I can remove it using JS and put a placeholder) but when I edit the debt entry, i want to display the values entered instead.. Debt E…
XAMPP localhost – Access denied error 403 after changing directory
I’m using php storm for a project and I tried to change from the built in web server to the apache one as it messed with my url redirections. Using a mac, I changed the directory to this one : After restarting the server, typing localhost in the search bar should direct me to the index.php file but I ge…
Shopware 6 How do I correctly add an array as extensions to SearchResult
I have multiple working subscriber classes subscribing to ProductListingResultEvent, that add an array as extension to the result. The code looks something like this: Is that the right way to do it? Do I always have to instanciate a new Struct to add data as an extension? Answer Yes you always have to instant…
How to get the edit history of a product on an e-commerce website? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 months ago. Improve this question I have built an e-commerce website where the admin can edit the prod…
How to get the complete word of the character that is obtained with stripos()? (PHP)
I can’t find the documentation that indicates how to do it. I am dynamically displaying a part of a post description in the search results from my website. Example: Result: I would like to be able to show “information” and not “formation”. Any suggestion? Answer Actually regular …
Symfony 6 data access and transmission between multiple tables with format error [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 10 …