jd2007 Posted July 17, 2007 Share Posted July 17, 2007 how do i take a variable from one php page to another ? for example, if i have two variables in 01.php and i want to use them in 02.php...what to do ? if i use the include function, other functions in 01.php will executed which i don't want...i only want the two variables...pls help me...tq... Quote Link to comment https://forums.phpfreaks.com/topic/60309-how-do-i-take-a-variable-from-one-php-page-to-another/ Share on other sites More sharing options...
per1os Posted July 17, 2007 Share Posted July 17, 2007 www.php.net/session Quote Link to comment https://forums.phpfreaks.com/topic/60309-how-do-i-take-a-variable-from-one-php-page-to-another/#findComment-300024 Share on other sites More sharing options...
pocobueno1388 Posted July 17, 2007 Share Posted July 17, 2007 Well, there are a number of ways. As Frost said, you can use sessions. You could also use hidden input fields and use POST, or you could pass the variables through the url and use the GET method. Quote Link to comment https://forums.phpfreaks.com/topic/60309-how-do-i-take-a-variable-from-one-php-page-to-another/#findComment-300026 Share on other sites More sharing options...
cooldude832 Posted July 17, 2007 Share Posted July 17, 2007 Each method has its own best uses so maybe a bit more explination be great. Also a lot of good methods are hybrids limiting the session load/post load and querying off a single session Quote Link to comment https://forums.phpfreaks.com/topic/60309-how-do-i-take-a-variable-from-one-php-page-to-another/#findComment-300029 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.