Beta1.0 Posted October 31, 2007 Share Posted October 31, 2007 Hi to all!! I am working on something and was wondering if the following is possible... ( I have tried it and am getting a blank instead of the value required). Do I have to declare the name variable in Page1... or is there a way to go around it?.. One solution could be sessions...but Is there another solution? Page1.php ---------- <?php function printName(){ print(" $name "); //notice the quotes } ?> Page2.php ----------- <?php include 'Page1.php'; $name = "bob"; printName(); ?> Thanks to all.. Quote Link to comment https://forums.phpfreaks.com/topic/75539-solved-variables-from-another-page/ 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.