Jump to content

JS to read PHP $_SESSION data from previous page???


barbs75

Recommended Posts

Hey guys,

 

Wasn't sure which forum to post this in, so i went with this one!!!

 

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

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.