Jump to content

how to read client side environment variables


sunilvadranapu

Recommended Posts

hi,

  can we read/access client side environment variables using Javascript? if so, please help me in writing the javascript to read env variables. If not, any other alternate is there??

 

  i want to read username from client env variables using javascript and want to use in PHP web application.

 

Thanks,

Sunil

well firstly the only real way to do it live woul dbe through AJAX - which would allow you to send the data to php and hten receive commands back.  alternatively build forms that send the data you want.  Lastly- its not relaly possible to access clientside stuff from the server........ but you can display server side variables into javascript by having your javascript in a file: javascript.php  then it simply executes before downloading to the client - saving those value sinto teh code.

 

 

gdlk.

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.