austine_power007 Posted December 18, 2006 Share Posted December 18, 2006 How do i inherit vaules from another php file ....?? i want to use the variable in another file ......how?? Quote Link to comment Share on other sites More sharing options...
JP128 Posted December 18, 2006 Share Posted December 18, 2006 You can include the file..[code]<?phpinclude "pagename.php";?>[/code] Quote Link to comment Share on other sites More sharing options...
austine_power007 Posted December 18, 2006 Author Share Posted December 18, 2006 [quote author=JP128 link=topic=119050.msg487060#msg487060 date=1166414640]You can include the file..[code]<?phpinclude "pagename.php";?>[/code][/quote]But it include the whole page with all the echo statement so i just want the varibales Quote Link to comment Share on other sites More sharing options...
JP128 Posted December 18, 2006 Share Posted December 18, 2006 You could also use SESSION variables. Quote Link to comment Share on other sites More sharing options...
JP128 Posted December 18, 2006 Share Posted December 18, 2006 That would be like$_SESSION['variable'] = "datahere";and you need session_start() at the top of the page. Quote Link to comment Share on other sites More sharing options...
austine_power007 Posted December 18, 2006 Author Share Posted December 18, 2006 [quote author=JP128 link=topic=119050.msg487065#msg487065 date=1166415723]You could also use SESSION variables.[/quote]i give you a example i have a text field under echo it is:echo "<td colspan='3'><input name='job_ttl' type='text' id='job_ttl' value=\"{$titl}\" size='50' DISABLED></td>";how can i pass this $titl value to another page?? Quote Link to comment Share on other sites More sharing options...
trq Posted December 18, 2006 Share Posted December 18, 2006 Store it in the $_SESSION array as suggested. You cannot simply pass varianbles from page to page. Quote Link to comment 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.