2
My attempt, a failure:
$post_id = preg_match("/^[0-9]+$/", $_POST['post_id']);
I tried to be a user who changed the id of the post to for example: post_id="43223646", However, when the data is entered into mysql, they are transformed into the number 1, how to make it work properly?
I suggest looking at the documentation of
preg_match
. It returns 1 or 0. You would have to use the third parameter– Lucas
how to make it work properly?
– Kevin mtk