AnotherQuestion Posted August 30, 2009 Share Posted August 30, 2009 I would like to write s session var when a user clicks on a link.... Something like <a href="Invoice.php?DocumentId=<?php echo $row_RsInv['Document']; ?>"> <?php echo $row_RsInv['Document']; ?><?php $_SESSION['DocumentId1'] = $row_RsInv['Document']?> </a> but the above doesnt work. Any Ideas Quote Link to comment https://forums.phpfreaks.com/topic/172503-onclick-thingy/ Share on other sites More sharing options...
RussellReal Posted August 30, 2009 Share Posted August 30, 2009 because once the php interpreter exits you can no longer use php.. so when the user actually sees the link.. it is already too late, you CAN however create an AJAX function to connect to a PHP file on your server than that php script sets the session var.. google AJAX Quote Link to comment https://forums.phpfreaks.com/topic/172503-onclick-thingy/#findComment-909403 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.