I found the answer how to open few pages in new tabs with a single click, but I don't know how to place urls from mysqli database using fetch.
mysqli statement is ...
$pick_site = $mysqli->prepare("SELECT url FROM sites where chosen = ? ORDER BY name ASC");
$pick_site->bind_param('s', $yesterday);
$pick_site->execute();
$pick_site->store_result();
$pick_site->bind_result($list_sites);
while ($pick_site->fetch_array()) {
$mysites = $list_sites;
}
here is working javascript code for opening tabs
<a id="test" href="#"> CLick </a>
<script type="text/javascript">
document.getElementById("test").onclick = function(){
window.open("http://www.google.com",'_blank');
window.open("http://www.p3php.in",'_blank');
}
</script>
Thank you very much, Ivan.