Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6714531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:30:25+00:00 2026-05-26T08:30:25+00:00

It’s my first post on here, and I’d just like to thank everyone so

  • 0

It’s my first post on here, and I’d just like to thank everyone so much for everything I’ve learnt from this forum, it’s a fantastic resource!

I made a complete noob mistake and coded my website using a lot of iFrames that load onclick. Then I learnt about SEO. Rather than start from scratch, I tried to find a workaround… I’ve found one that seems to works nicely, but I’m a little concerned about it’s vulnerability to SQL injections, and other scary stuff I know too little about. A lot of the content pages on my website are in PHP and some use MySQL as well.

I tweeked the solution found here http://www.dynamicdrive.com/forums/showthread.php?t=12512, but the site doesn’t seem to deal much with PHP and MySQL, so I thought it would be better to ask my question here instead, and get a fuller picture of how I should be thinking about this. I’d be really grateful for any input. Thank you for reading this far, even if you can’t help!

My concern is that the redirected page generates a URL like:

http://website/?framepage=http://website/folder/index.php

The script for the page with the iFrame (the main page):

<script type="text/javascript">

function loadframe(){
if(window.location.replace)
window.frames.Frame1.location.replace(get('framepage'));
else
window.frames.Frame1.location.href=get('framepage');
}

{
if(window.location.replace)
window.frames.Frame2.location.replace(get('framepage'));
else
window.frames.Frame2.location.href=get('framepage');
}

{
if(window.location.replace)
window.frames.Frame3.location.replace(get('framepage'));
else
window.frames.Frame3.location.href=get('framepage');
}

function get(key_str) {
var query = window.location.search.substr(1);
var pairs = query.split("&");
for(var i = 0; i < pairs.length; i++) {
var pair = pairs[i].split("=");
if(unescape(pair[0]) == key_str)
return unescape(pair[1]);
}
return null;
}
if (location.search&&get('framepage')!=null)
if ( typeof window.addEventListener != "undefined" )
    window.addEventListener( "load", loadframe, false );
else if ( typeof window.attachEvent != "undefined" )
    window.attachEvent( "onload", loadframe );
else {
    if ( window.onload != null ) {
        var oldOnload = window.onload;
        window.onload = function ( e ) {
            oldOnload( e );
            loadframe();
        };
    }
    else
        window.onload = loadframe;
}
</script>

and then script for the content page (to be displayed in the above iFrame):

<script type="text/javascript">
function load_content (page) {
if (window.location==top.location)
if (window.location.replace)
top.location.replace(page+'?framepage='+top.location.href);
else
top.location.href=page+'?framepage='+top.location.href;
}
</script>

not forgetting the html for the content page:

<body onload="load_content('index.html');">
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:30:25+00:00Added an answer on May 26, 2026 at 8:30 am

    You’re not vulnerable to SQL injection there – That code is all in Javascript.

    However there are XSS vulnerabilities, I’d recommend validating that the URL is an actual URL first before displaying it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.