Jump to content

JavaScript Save Values


The Little Guy

Recommended Posts

What would be the best way to send JavaScript variables to a database?

 

My guess would be that I would have to some how pass the values off to PHP... Right?

 

What is going to happen, is that some user takes a code I give them, then JavaScript will get some values such as screen resolution and small things like that... Screen resolution can only be gotten with JavaScript, and once it has been gotten, it needs to send the values back to my server, to save into a database... So... how is this done?

Link to comment
https://forums.phpfreaks.com/topic/75437-javascript-save-values/
Share on other sites

a few ways.  A hidden input variable sending via a form as normal in php.

Ajax (this uses js vars any way)

 

Yes screen res in php is an issue.  A lot of people will "flash" on first load of a site to get the screen res store it in a session or cookie to use on all other pages.

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.