Originally posted by netmastan
anyone can call page.php ?
How I will pass variable to this page ?
Where do i put the following code ?
window.open("page.php","window title","height=600,width=650,scrollbars=yes,toolbar=no");
In your ogirinal function, remove the line
Header("Location: $listen");
and replace it with
echo <<< END
<script>window.open("page.php","window title","height=600,width=650,scrollbars=yes,toolbar=no")
END;
like so (you can put php variables inside the echo if you want):
function getit($lid) {
global $prefix, $dbi;
sql_query("update ".$prefix."_audio set hits=hits+1 where lid=$lid", $dbi);
$result = sql_query("select listen from ".$prefix."_audio where lid=$lid", $dbi);
list($listen) = sql_fetch_row($result, $dbi);
echo <<< END
<script>window.open("page.php","window title","height=600,width=650,scrollbars=yes,toolbar=no")
END;
}