Jump to content

Redirect php output to calling html page


geronimo

Recommended Posts

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
Link to comment
Share on other sites

[!--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 display

Ken
[/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
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

[!--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?

Thanks
soc
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.