shishirkotkar Posted April 17, 2010 Share Posted April 17, 2010 I have a html file - Home.html I have another php file - test.php I am calling test.php on click of a submit button from Home.php in test.php i am processing the input from Home.php I want to send the processed results back to Home.php and present it as values in dropdown list. How do i do that? Link to comment https://forums.phpfreaks.com/topic/198848-how-to-pass-a-value-from-php-to-html/ Share on other sites More sharing options...
Mchl Posted April 17, 2010 Share Posted April 17, 2010 echo Link to comment https://forums.phpfreaks.com/topic/198848-how-to-pass-a-value-from-php-to-html/#findComment-1043731 Share on other sites More sharing options...
shishirkotkar Posted April 17, 2010 Author Share Posted April 17, 2010 echo() will display the value on the page. I want to use that variable in a dropdown list. how do i? Link to comment https://forums.phpfreaks.com/topic/198848-how-to-pass-a-value-from-php-to-html/#findComment-1043742 Share on other sites More sharing options...
Mchl Posted April 17, 2010 Share Posted April 17, 2010 There are two possible scenarios, don't know which you're interested in First. 1. on home.php a form is being submitted to test.php 2. test.php does it's job, and saves processed data to session, then redirects to home.php 3. home.php reads data from session and uses it to echo dropdown list values Second 1. home.php sends AJAX request to test.php 2. test.php does it's job and sends AJAX reply to home.php 3. home.php uses JavaScript to modify dropdown list accordingly. Link to comment https://forums.phpfreaks.com/topic/198848-how-to-pass-a-value-from-php-to-html/#findComment-1043750 Share on other sites More sharing options...
shishirkotkar Posted April 17, 2010 Author Share Posted April 17, 2010 I am interested in the first scenario Link to comment https://forums.phpfreaks.com/topic/198848-how-to-pass-a-value-from-php-to-html/#findComment-1043753 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.