CSS Div send vars to PHP function
Posted: Thu Apr 22, 2010 7:40 pm
I am using a CSS popup which calls in a PHP page using include(). The contents of the page being called in are dynamically generated based on a variable which I've named '$id'.
Somehow I need the onclick handler to get the value of $id from my CSS statement to the the variable $id to be used in the function callPage(). Variable $id will come from a database using $row['id'].
Three days working on this on my own and no solution. I'm beginning to think this may be impossible. Anyone have any suggestions?
Thanks!
Code: Select all
<?PHP
function callPage($id) {
include("page.html?id=".$id);
}
echo "<a onmouseover='this.style.cursor=\"pointer\" ' onfocus='this.blur();' onclick=\" document.getElementById('PopUp').style.display = 'block'\" ><span style=\"text-decoration: none;\">".$row['title']."</span></a><br>";
$id=xx;
callPage($id)
///// MORE CSS
?>
Three days working on this on my own and no solution. I'm beginning to think this may be impossible. Anyone have any suggestions?
Thanks!