The first thing I do is capture the variable of a form and through a PHP file I make the query. But in this way I only capture the IDs that do not have asterisks, example 123456789, I need to show the information of the IDs in this way 123 * 456 * 789 or only 123 * 456.
This is the code that exists in PHP, but only captures numeric values.
$ id = $ _POST ['id'];
$query = "SELECT * FROM h_vida WHERE h_vida.id= '$id'";
These are examples of existing IDs in the h_vida table
The form where the data to be searched is entered is not more than an input text of html like the following:
The structure of the table is as follows:
I know that REGEXP can possibly work for me, but I do not know how to apply it to call me exactly the data according to the ID that I type, with everything and asterisks, regardless of the number of groups that it may be.
What should I do so that the PHP code through the SQL query (REGEXP) shows me the data of the ID table with asterisk (s) typed?