HalfNote5 Posted March 7, 2013 Share Posted March 7, 2013 I have a framework .php file (for right now we'll call it "index.php") Within index.PHP, it includes another PHP (which we'll call PagePanel.php) to show all of the items in a list (or a portion thereof, as dictated by a search parameter, which we'll call "SearchString"). I would like to be able to do a post form submit of "SearchString" to index.php and when index.php loads the included PagePanel.php, it also passes "SearchString" to PagePanel.php's $_POST array. Any easy way to do this? I've been googling it, but I'm evidently not phrasing it correctly. Link to comment https://forums.phpfreaks.com/topic/275342-passing-form-submit-data-to-nested-php-document/ Share on other sites More sharing options...
teynon Posted March 7, 2013 Share Posted March 7, 2013 $_POST is a super global. So it will be accessible to all included files automatically. Are you "including" the file like "include('myfile.php');" or including it as like an iframe or something like that? Link to comment https://forums.phpfreaks.com/topic/275342-passing-form-submit-data-to-nested-php-document/#findComment-1417056 Share on other sites More sharing options...
HalfNote5 Posted March 7, 2013 Author Share Posted March 7, 2013 include('myfile.php'); Technically <?phpinclude("php2/test_api8_withpost.php");?> because the "index.php" file is mostly HTML Link to comment https://forums.phpfreaks.com/topic/275342-passing-form-submit-data-to-nested-php-document/#findComment-1417057 Share on other sites More sharing options...
HalfNote5 Posted March 7, 2013 Author Share Posted March 7, 2013 Oh hell; I should be using php2/test_api13_withpost.php My bad; it works fine, and I'm apparently either low on sleep, have been working on this too long, or have suddenly gone stupid. My apologies. Link to comment https://forums.phpfreaks.com/topic/275342-passing-form-submit-data-to-nested-php-document/#findComment-1417059 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.