So basically what im trying to do is pass a variable from a JS function to PHP variable.
Currently the onClick code is:
<?php include('onload.php'); ?>
<body>
<br /><br /><br /><br />
<center><font color="black" size=20><a style="text-decoration:none" href="#" onClick="showpopupshare()">
ShowpopupShare():
function showpopupshare()
{
document.getElementById('mmpopup').style.display='block';
document.getElementById('mmpopup1').style.display='block';
window.setTimeout("StartTheTimer()",30000);
}
-- What im trying to do:
Index:
<?php include('onload.php'); ?>
<body>
<br /><br /><br /><br />
<center><font color="black" size=20><a style="text-decoration:none" href="#" onClick="showpopupshare(2)">
Notice the showpopupshare(2)
Then do this:
function showpopupshare(id)
{
$phpmyvariable = id;
document.getElementById('mmpopup').style.display='block';
document.getElementById('mmpopup1').style.display='block';
window.setTimeout("StartTheTimer()",30000);
}
I know that isn't going to work but how can i achieve the same effect? The page can't be reloaded.