User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 329,739 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,586 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 132 | Replies: 4
Reply
Join Date: Feb 2008
Posts: 185
Reputation: kevin wood is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Junior Poster

sending variables to other pages

  #1  
3 Days Ago
i have a problem about sending variables through to other pages. I have done this before using forms to post the variables. I have tried to use the SESSION_START () function but that does not like the code i have used for the image resize on the page.

i have added a random number to an image so that if a new image is uploaded it cannont show the old images as the file will never have the same path.

what i need to know is what is the best way to get the variable on to the next page. I was looking at the $_GET function to add the variable to the url but the upload takes place in an iframe so this cannot be done.

what ither ways are left as i have exhausted my knowledge of passing this variable on. I have had a look at cookies but not sure if they can be used.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2008
Posts: 9
Reputation: nickyspace is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nickyspace's Avatar
nickyspace nickyspace is offline Offline
Newbie Poster

Re: sending variables to other pages

  #2  
3 Days Ago
hi
kevin

will you post the code
so that i can help you better.
nickyspace
Reply With Quote  
Join Date: Feb 2008
Posts: 185
Reputation: kevin wood is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Junior Poster

Re: sending variables to other pages

  #3  
3 Days Ago
sorry i took so long gettin back i have been away from the comp. what code would you like me to upload.
Reply With Quote  
Join Date: Jan 2008
Posts: 28
Reputation: robothy is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
robothy robothy is offline Offline
Light Poster

Re: sending variables to other pages

  #4  
2 Days Ago
Kevin, have you tried using the session array? Assigning variables to $_SESSION before the page changes, and retrieving them when the new page loads?

R
Reply With Quote  
Join Date: Feb 2008
Posts: 185
Reputation: kevin wood is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Junior Poster

Re: sending variables to other pages

  #5  
21 Hours Ago
i have been looking at using $_SESSION but i keep finding conflicting information about it. I cannot use session_start() as it does not like some of the code on my pages. When researching the $_SESSION array it says in places that session_start must be used and in others says it can be used on its own and the variables will be available across the other pages.

do you know were i can find a good tutorial on this.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Marketplace (Sponsored Links)
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 3:53 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC