So basically , I'd like to pass a PHP get variable from a link to Javascript so I can open a new smaller window with the appropriate content from the value passed to the URL .. I tried to do that below and I couldn't ... I'd really appreciate your assistance. The code below generates image hyperlinks that each have their ids from the database , so when the image is clicked on , a new window should be open but the ID should be passed to the javascript window.open method ... I tried to do that with AJAX to load the content according to the get variable but I couldn't do it !!
<?php
require('../database/connect.php');
database_connect();
$query = "select * from Entertainers";
$result = $connection->query($query);
$row_count =$result->num_rows;
for($i = 1; $i <= $row_count; $i++)
{
$row = $result->fetch_assoc();
?>
<?php echo "<a href='' onclick='window.open(profile.php?id=".$row['ID'].")'><img src ='../".$row['Picture']."' width='100' height='100' /> </a>"; } ?>
while($row = $result->fetch_assoc()){}
?? – NullPoiиteя Dec 22 '12 at 4:44