paulc8481 Posted April 14, 2012 Share Posted April 14, 2012 I am creating a webpage for my golf league and some of the information(variables) such as Name, Address and email, must be reused across multiple pages for different outputs. May question is "Can I, or is there a way to reUse variables across multiple pages. "Do I need to create a session and make everything session variables"? "Should I link to a database and call the information when needed"? Any explanation would be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/260921-reusing-variables-across-multiple-pages/ Share on other sites More sharing options...
xyph Posted April 14, 2012 Share Posted April 14, 2012 Sessions are the easiest way. If its data that won't get changed very often, or one-time-use, it's a great way to go. Quote Link to comment https://forums.phpfreaks.com/topic/260921-reusing-variables-across-multiple-pages/#findComment-1337311 Share on other sites More sharing options...
paulc8481 Posted April 14, 2012 Author Share Posted April 14, 2012 So if I wanted to create pages that the players, officials, and moderators can modify you would then recommend creating a database? Paul Quote Link to comment https://forums.phpfreaks.com/topic/260921-reusing-variables-across-multiple-pages/#findComment-1337314 Share on other sites More sharing options...
xyph Posted April 14, 2012 Share Posted April 14, 2012 There's a bit of a learning curve, but it worth every second. Databases, once understood, are the most powerful way to manage and organize your data. If you don't have a database server available, SQLite support is bundled with PHP. It requires no server and is very quick Quote Link to comment https://forums.phpfreaks.com/topic/260921-reusing-variables-across-multiple-pages/#findComment-1337315 Share on other sites More sharing options...
paulc8481 Posted April 14, 2012 Author Share Posted April 14, 2012 XYPH, Thanks for responding so quickly. I have created and edited small databases in the past but still a rookie in php. I am using xampp to create these data bases and running them on my laptop to see how they work. So far the results have been ok. I am cursed with the problem of over thinking these projects so I tend to as alot of questions. thanks for your help Quote Link to comment https://forums.phpfreaks.com/topic/260921-reusing-variables-across-multiple-pages/#findComment-1337317 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.