reckdan Posted August 21, 2007 Share Posted August 21, 2007 I have two files search.php and update.php, i have a combo box which is populated with a list of organizations and a search button on search.php and a detail form on update.php. Now I want to code the search button such that when i select an organization and click on the search buttom, details of the selected organization will pupolate the form on update.php. Basically i want to send the information on the search.php to the update.php so that i can use it to retrieve detail information on the update.php Help need urgently Quote Link to comment https://forums.phpfreaks.com/topic/65985-send-information-from-one-file-to-another/ Share on other sites More sharing options...
Wuhtzu Posted August 21, 2007 Share Posted August 21, 2007 Well if you have a bunch of variables you would like to transfer from one script/page to another you could use sessions... search.php <?php //Start a session session_start(); $name = "Some Name"; $email = "your@email.com"; //Store the variables as session variables $_SESSION['name'] = $name; $_SESSION['email'] = $email; ?> update.php <?php //Start a session session_start(); echo $_SESSION['name']; //Will print "Some Name" echo $_SESSION['email']; //Will print "your@email.com" ?> That's a simple transfer of variables from one page to another... if that's not what you meant please specify your problem Quote Link to comment https://forums.phpfreaks.com/topic/65985-send-information-from-one-file-to-another/#findComment-329955 Share on other sites More sharing options...
MadTechie Posted August 21, 2007 Share Posted August 21, 2007 when you submit the form on the search.php does the action goto upload.php ? if so then on the upload.php just use echo $_POST['name']; or echo $_GET['name']; //name being the form element name Quote Link to comment https://forums.phpfreaks.com/topic/65985-send-information-from-one-file-to-another/#findComment-329961 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.