Jump to content

[SOLVED] JS to read PHP $_SESSION data from previous page???


Recommended Posts

Hey guys,

 

Right, what i'm trying to do is have one of those features on a form, where you can click a button saying 'is your billing address the same as your home address?' and then if you click on it, it copies the data into the fields for you.

 

I have a page on my user profile system, where the user can update their home address, which is then stored in my database, and stored in php $_SESSION data.

 

I then have a house upload page, where the user can upload a house to sell, where they have to enter the address of the house they are selling, the house might not be teh same as their home address, or it might be. So i want to give the option of clicking a button to copy the session variables into the fields automatically if their billing address is the same.

 

Is Javascript teh best way to do this? and can javascript read in the data from the php sessions and put them in the text fields???

 

I'm sure this is a really simple procedure, it is quite a common function on forms that i have seen on the web, if anyone can help me out, or know any examples etc, any help will be welcomed!!

 

cheers guys

 

Craig

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.