PDA

View Full Version : Session variable equal a Get


woofy
01-29-2010, 09:37 PM
I am trying to have the session variable for a page ID equal the get value from the previous link. Right now I have it written as

<?php $_SESSION['PAGEID']='<?php echo $_GET['ID']; ?>';?>

However it's not working. I am getting the unexpected T string error. Rather then beat my head trying to code this correctly I need to know if it will even be a possibility first. Then if you don't mind show me the correct way to write it. Thanks!

edbr
01-30-2010, 12:12 AM
<?php
$_SESSION['PAGEID']= $_GET['ID'];
?>