Web Hosting Talk







View Full Version : simple php code needing converted to asp code.


lochie
08-29-2007, 11:05 AM
I'm trying to make 1 page with an iframe but when linking to it, be able to change which page opens up in the iframe.

With php I'd use the following:

http://www.domain.com/ifp.php?page=page1
http://www.domain.com/ifp.php?page=page2


Code:
<iframe... source="<?php echo'$page'; ?>.htm ... ></iframe>So ifp.php would always be used as the 'template/designed page' and the link gives the name of which page should be in the iframe.

So, I need the iframe to load up many html pages determind by the links in the menu.

network-junkie
08-30-2007, 01:29 AM
bad idea.
consider this url with your example:
http://www.domain.com/ifp.php?page=http://www.webhostingtalk.com/

consider this
http://www.domain.com/ifp.php?page=http://www.domain.com/ifp.php?page=http://www.domain.com/ifp.php

and you have your account suspended for server dos, if you use shared hosting.

You have to filter this $page var. That's the must. For example case() will work or simple if/else.

lochie
08-30-2007, 04:33 AM
This is for a private network so abuse is not possible, and I'm not using php I'm using asp.