husslela03 Posted April 17, 2010 Share Posted April 17, 2010 I would like to create a button for a user to click in which carries session data, however nothing is selected on a form that is selected...how would i do that? and i need to carry two session items... Link to comment https://forums.phpfreaks.com/topic/198813-button-to-pass-session-data-but-no-form-data/ Share on other sites More sharing options...
ChemicalBliss Posted April 17, 2010 Share Posted April 17, 2010 Why? Session items would have to be created on the form page, then you can just setup a dummy form to go to another page. the session variables will still be there. you cannot create session variables by way of a form unless you use a php processor to create the session variables. -cb- Link to comment https://forums.phpfreaks.com/topic/198813-button-to-pass-session-data-but-no-form-data/#findComment-1043472 Share on other sites More sharing options...
coupe-r Posted April 17, 2010 Share Posted April 17, 2010 Session items carry over through out your entire site, as long as you have session_start(); at the top of your pages. Link to comment https://forums.phpfreaks.com/topic/198813-button-to-pass-session-data-but-no-form-data/#findComment-1043473 Share on other sites More sharing options...
Pikachu2000 Posted April 17, 2010 Share Posted April 17, 2010 Huh? You need to be a bit more specific than "nothing is selected on a form that is selected". What would this form look like? What would its function be, etc.? Link to comment https://forums.phpfreaks.com/topic/198813-button-to-pass-session-data-but-no-form-data/#findComment-1043476 Share on other sites More sharing options...
husslela03 Posted April 17, 2010 Author Share Posted April 17, 2010 so can i just use a regular html link tag then? and just make sure i put session_start() at the top? Link to comment https://forums.phpfreaks.com/topic/198813-button-to-pass-session-data-but-no-form-data/#findComment-1043479 Share on other sites More sharing options...
ChemicalBliss Posted April 17, 2010 Share Posted April 17, 2010 yup. http://www.lmgtfy.com/?q=PHP+SESSION+TUTORIAL -cb- Link to comment https://forums.phpfreaks.com/topic/198813-button-to-pass-session-data-but-no-form-data/#findComment-1043482 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.