Folks,
This:
““
http://localhost/test/pagination_2.php?col=$col&search=$search&limit=$limit&page=$i
is equal to this:
““
http://localhost/test/pagination_2.php?col=domain&search=heman.com&limit=10&page=1
Url is a page that shows a pagination showing result of keyword search for “heman.com”.
Now, this following iframe opens to such a pagination showing result of keyword search for “heman.com”.
““
<iframe src=’http://localhost/test/pagination_2.php?search=heman.com&tbl=browsing_histories&col=domain&limit=’></iframe>
But the following 2 codes just opens to pagination_2.php. Browser not taking into account the params in the url. Why ?
1
““
$_SESSION[‘url ‘] = $url = “http://localhost/test/pagination_2.php?”;
$_SESSION[‘search’] = $search = $domain; //’$search’ value holds the ‘keyword’ to search.
$_SESSION[‘tbl’] = $tbl = ‘browsing_histories’;
$_SESSION[‘col’] = $col = ‘domain’; //’$col’ value holds the column to search.
$_SESSION[‘page’] = $page = 1;?>
<iframe src='<?php echo “.htmlentities($url)” .’?col=’ .urlencode($col) .’&search=’ .urlencode($search) .’&limit=’ .urlencode($limit) .’&page=’ .urlencode($page) .”‘></iframe><br>”;
2
““
printf(
“<iframe src=’%s?col=%s&search=%s&limit=%d&page=%d’></iframe><br>”,
htmlentities($url),
urlencode($col),
urlencode($search),
$limit, // %d place-holder will force integer
$i // ditto
);
How to fix ?