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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.