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?? Link to comment https://forums.phpfreaks.com/topic/31048-inherit-vaules/ 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] Link to comment https://forums.phpfreaks.com/topic/31048-inherit-vaules/#findComment-143344 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 Link to comment https://forums.phpfreaks.com/topic/31048-inherit-vaules/#findComment-143348 Share on other sites More sharing options...
JP128 Posted December 18, 2006 Share Posted December 18, 2006 You could also use SESSION variables. Link to comment https://forums.phpfreaks.com/topic/31048-inherit-vaules/#findComment-143349 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. Link to comment https://forums.phpfreaks.com/topic/31048-inherit-vaules/#findComment-143350 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?? Link to comment https://forums.phpfreaks.com/topic/31048-inherit-vaules/#findComment-143352 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. Link to comment https://forums.phpfreaks.com/topic/31048-inherit-vaules/#findComment-143361 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.