geronimo Posted April 5, 2006 Share Posted April 5, 2006 1. I have an index.html page with hyper links on it. [u]link1 [/u][u]link2 [/u][u]getlist.php [/u]2. The hyper links are/run/trigger php scripts....ex: getlist.php. 3. The php script queries a mysql database. 4. The results are produced and then viewed on a new web page. Question-problem: I want to imbed the results on the calling HTML page....i.e. index.html EXAMPLE : Output sought (Displayed on index.html): [u]link1 [/u][u]link2 [/u]RESULTS of php code query of the mysql database should go here. aaaa(bbbb) " " etc. etc. Thank you Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 5, 2006 Share Posted April 5, 2006 Either you combine your PHP and HTML into one PHP script or you can use AJAX techniques from javascript to asynchronasly call your PHP scripts and return the information back to javascript to displayKen Quote Link to comment Share on other sites More sharing options...
geronimo Posted April 5, 2006 Author Share Posted April 5, 2006 [!--quoteo(post=362019:date=Apr 5 2006, 03:17 PM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Apr 5 2006, 03:17 PM) [snapback]362019[/snapback][/div][div class=\'quotemain\'][!--quotec--]Either you combine your PHP and HTML into one PHP script or you can use AJAX techniques from javascript to asynchronasly call your PHP scripts and return the information back to javascript to displayKen[/quote]1. Thanks for responding.2. I thought about combining the PHP and HTML but that would require multiple copies - close to 100 of the same HTML file......and that file is already big.3. I don't know anything about AJAX!Thanks soc Quote Link to comment Share on other sites More sharing options...
akitchin Posted April 5, 2006 Share Posted April 5, 2006 i believe what ken meant was that you could send the links to the same page you're on, and simply run the appropriate query based on what was sent. then output it where appropriate.you only need ONE file to parse all the links in this way, not a great deal of them. Quote Link to comment Share on other sites More sharing options...
geronimo Posted April 6, 2006 Author Share Posted April 6, 2006 [!--quoteo(post=362064:date=Apr 5 2006, 06:20 PM:name=akitchin)--][div class=\'quotetop\']QUOTE(akitchin @ Apr 5 2006, 06:20 PM) [snapback]362064[/snapback][/div][div class=\'quotemain\'][!--quotec--]i believe what ken meant was that you could send the links to the same page you're on, and simply run the appropriate query based on what was sent. then output it where appropriate.you only need ONE file to parse all the links in this way, not a great deal of them.[/quote]Hi:1. Thanks for responding.2. What I did was add this line to the "called" php script: <?php include("index.html"); ?>3. I made this the first line in the script.4. It worked........but.5. The results are produced at the bottom of the page and below the table.Need: I would like it to be displayed in the following location:(here is the code)**************************************************************** <tr> <td height="380" valign="top"> </td> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX </tr></table> ***************************************************************XXXXXXX - marks the spot.Any suggestions?Thankssoc Quote Link to comment Share on other sites More sharing options...
Anidazen Posted April 6, 2006 Share Posted April 6, 2006 I believe you can access the page that sent you via http_refer or some similar command in PHP. (Search the docs for 'refer'). This could be used to make a link?Alternatively, you can use the JavaScript window.history.Back(); function. Quote Link to comment 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.