Trying to read through this query string to get a list of subjects (sub) and products (pro)
sub2=pro73&sub2=pro76&sub2=pro79&sub2=pro90&sub2=pro92&sub3=pro73&sub3=pro74&sub3=pro87&sub3=pro90
so i need
2 -73, 2-76, 2-79, 3-73, 3-74 etc.
What am i missing in this code.
foreach($_POST as $key => $val) {
$sub = substr($key, 3);
$pro = substr($val, 3);
// $links = "SELECT * FROM table WHERE sub='".$sub."' AND pro='".$pro."';";
}
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.