Jump to content

Onclick Thingy


AnotherQuestion

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/172503-onclick-thingy/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/172503-onclick-thingy/#findComment-909403
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.