I would like to ask you if it is neccessary to check $_POST before db insertion even in cases that I know that user must fill these inputs by some data. And if yes, what is the best way? Because now I use this, but it is quite time consuming to write every one, if I have more inputs. Thank
PHP don’t recognize row variables
I am having trouble posting a mysql table to my website. Basically, the php error says that the row variable that I used was undefined. I tried using a code from a youtube tutorial but to no avail. I also checked my sql query on phpmyadmin and it seems to work just fine. Here is my test code for your
Falling testing Laravel assertModelExists
Making a test for database with Laravel (8.44.0) assetion assertModelExists(), fails on an error. The test class looks like this What do you think is missing? Answer The assertModelExists method was added September 2021: https://github.com/laravel/framework/pull/38766 Version 8.44.0 was released May 2021: htt…
How to delete every element of specific type in php? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 9 months ago. Improve this question Hey so i have a use of a php function that would delete every element of …
Replace value of variable in JS file using Regex in php
I want to change the value of a variable in js file using php, what i tried so far is to get the file contents and try to find a robust regex formula to change the value of the variable: here is the contents of the js file, keeping in mind that the value can be anything between = and
Laravel 7 – Temporary Users
I’m kind of new in Laravel, so I want to know if someone can tell me the best way to implement a temporary user. I tried to add a variable that bring me the value of active and then try to added on the condition for each role, but it didn’t work. Somebody can help me? I have this in
Adding a search icon to a WordPress Search bar
I am using the following WordPress function to output a WP search form: echo get_search_form(); Resulting output on the frontend topbar: I would like to add a search icon (magnifying glass) inside the placeholder. Currently I have text only inside the placeholder. I tried using the before pseudo element with …
strtotime returns today’s date for a date in wrong format
When I pass ‘7.12.60’ to strtotime, it returns timestamp of today! I know strtotime guesses the format of the given string but here the value is not correct at all! it just returns today’s timestamp: What i expect is to receive a false or a correct value and not a made up one Answer As menti…
URL parameter is handled incorrectly on multisite
With a form that is displayed via a shortcode, we want to add parameters to the URL and then read it out again in another shortcode. These functionalities are added via a custom plugin. This works fine on a standard WordPress installation. However, if we add the plugin to a multisite installation, it does not…
Hide the tables until the response is sent
I have a problem, make a small script to track packets over the Internet. It works properly, the problem is that before the client sends its guide number the tables are already displayed (empty) and once the guide is put on, the data that pulls from the API already appears. Is there a way that as long as the …