ajay600 Posted March 30, 2010 Share Posted March 30, 2010 Consider i have given 3 web pages as input $doc->loadHTMLFile('http://www.a.net/page_a.htm'); $doc3->loadHTMLFile('http://www.a.net/page_b.htm'); $doc2->loadHTMLFile('http://www.a.net/page_c.htm'); i have the code to remove the contents that are commonly repeated in all the 3 pages.. so now after removing same contents in page 1 , 2 and 3 finally when i want to display the output i did echo $doc->saveHTML(); echo $doc2->saveHTML(); echo $doc3->saveHTML(); and it displayed all the 3 web pages one below the other but i want to display the first page alone ( echo $doc->saveHTML() ) and when i click on a link that is present in page 1 , i have to display the second page(echo $doc2->saveHTML()) and when i click on another link available in page 1 i have to display the third page(echo $doc3->saveHTML()) how can it be done using php Link to comment https://forums.phpfreaks.com/topic/196955-display-page-when-a-link-is-clicked/ Share on other sites More sharing options...
jonsjava Posted March 30, 2010 Share Posted March 30, 2010 Seeing how PHP works, you will need to use AJAX for this. PHP processes the source file, and outputs the data that is requested, then it's done. It does not pause for client-side inputs. Might want to go to the AJAX section to learn how to make those kinds of calls. Link to comment https://forums.phpfreaks.com/topic/196955-display-page-when-a-link-is-clicked/#findComment-1034103 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.