Jump to content

Session variables and Javascript


tsluss

Recommended Posts

I was wondering if it were possible to code Javascript to assign values to Session variables?  What I'm doing is creating a site that lists a summary of information in the database, when it lists the information one of the text line or a button will be used to open a new window and then list all of the information related to that database entry.  For instance a persons name will be listed, then when you click their name (or a button beside their name) the new window will appear and list the information for that person.

 

I thought using session variables from the main page then using them to pull the database value in the new window would probably be the best way to handle it unless someone else can recommend another way.  If this is the best way though the only way I knew to make it work was to use a Javascript onClick event to assign a session variable a value and then use that in the new form as the values to pull from the database.

 

Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/45558-session-variables-and-javascript/
Share on other sites

does this mean you list the relevent data agianst each user listed. If so why not store it as a hddien field and then read the contents of the hidden field in javascript. this may make the page very 'top-heavy' if a lot of data is required. jsut a thought for something qucik and easy if not particularly elegent

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.