Answer the question
In order to leave comments, you need to log in
How to open multiple pages in a loop using header()?
I have that but it doesn't work.
for ($i = 0; $i < $count_market; $i++) {
$arrReq = array();
$arrReq['pg_testing_mode']=1;
$arrReq['cart_info']=$_POST['cart_info'];
$arrReq['pg_merchant_id'] = $MERCHANT_ID;
$arrReq['pg_order_id'] = $IDMARKET;
$arrReq['pg_amount'] = $SUMMA;
$arrReq['pg_payment_system'] = 'TEST';
$ag[] = array_values($arrReq);
$query.$i = http_build_query($ag[$i]);
header("Location: https://www.pl.ru/ment.php?$query.$i");
}
Answer the question
In order to leave comments, you need to log in
No way, there can be only one Location in the answer. Rather, there can be many of them, but only one is used - the rest are ignored by the browser.
You can try to do this in js using window.open, but the browser will quickly stop this business.
print some JS code on the page like this
<script>window.open(url1,'_blank');
window.open(url2,'_blank');
window.open(url2,'_blank');</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question