Via post (not get) method, i’mm getting id’s in one file in php… How can I take this parameters into sql where method?
So example: i get: 1234, 4571, 1112; and sql must be like this: Select * from balalala WHERE id=1234 and id=4571 and id=1112… it can be one or more parameters… but how to automatize this using php and post method?
Via post (not get) method, i’mm getting id’s in one file in php… How
Share
Get your data in an array (in this example, it’s called
$data). If your POSTdata is passed as an array, just$data = $_POST['ids']would be fine. If you actually have a comma-separated string, then use$data = preg_split("(\s*,\s*)",$_POST['ids']);. Then, use this:The
INsyntax allows you to define a list of options the ID may be.