Results 1 to 6 of 6

Thread: [RESOLVED] Get HTML source code using JavaScript

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    54

    Resolved [RESOLVED] Get HTML source code using JavaScript

    I need to be able to access some database information without directly using PHP. My PHP page on the server will get the information like this...

    <? php
    ...
    $SQL = "SELECT .. FROM .. WHERE id = '" . $id . "'";
    ...
    (create array from SQL for chosen record)
    ...
    $mytext = $sqlResult['somefield'];
    Print($mytext);
    ?>

    So if I go to the page, using pagename.php?id=34 for example, the text for that entry in the database will be displayed in the browser.

    Next, I need to use a page on a different server, that doesn't have PHP running, to access that. So something like...

    <HTML>
    <body>
    <b><script>some javascript to get source code from 'pagename.php?id=34' page and write to document</script></b>
    </body>
    </HTML>

    The purpose of this is for a content generator that stores information in a database but people with webpages on their own servers can include data.

    Any ideas? Thanks in advance.
    Last edited by snappel; Nov 10th, 2005 at 05:06 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width