Skip to content

Do I need to verify $_POST before db insertion and what is best way

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 …

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…

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 …