Results 1 to 5 of 5

Thread: Opening a page in the same window

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    101

    Opening a page in the same window

    Okay I asked for help with this a few months back I wanna have pages that in a navigation thing that will open the page within the middle of the site kinda like an iframe but with php I dont really like iframes and im trying to work with php now however I had a script a friend gave me however it ended up get me exploited heh someone was able to run a XSS on me that allowed them to upload stuff to my server so now I need something new to use.

    heres what I was using but it get me hacked...

    Code:
    <?php 
    if (!isset($_GET["link"])) include 'main.php';
    else if(is_file($_GET["link"] . ".php") && $_GET["link"] !="index" ) include htmlspecialchars($_GET["link"] . ".php");
    else include 'error.php';
    ?>
    I need something like this but more secure. or if anyone knows how to fix the above script maybe show me how to fix it so it cant be exploited.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Opening a page in the same window

    It's a little hard to understand you. Too many run on sentences! And I don't understand what your navigation "thing" is. And what are you saying about IFRAMEs? Do you want to use it or not and if not, what are you currently using?

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Opening a page in the same window

    I did warn you!

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    101

    Re: Opening a page in the same window

    Okay Plain in simple You know how you use an iframe to load stuff within a page it opens a new page within the iframe I wanna do the same but in php without an iframe.

    an exsample is lets say I have a few things like...

    home.php
    news.php
    downloads.php
    about.php

    I want all theses pages to open like an iframe does but done in php with no iframe people should me in another topic but I dont get most of it so im trying to see if someone else might know.

  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Opening a page in the same window

    Click the link that penagate supplied you with and use the code that he gave you four months ago.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

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