page refresh work around (newbie)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
effour
Forum Newbie
Posts: 1
Joined: Wed Aug 03, 2005 8:04 pm

page refresh work around (newbie)

Post by effour »

Hello,

Hoping someone can give me a hand. I have an xml driven flash menu that cannot be refreshed everytime a page is loaded via this:

<a href="index.php?c=1">PAge link</a>


into this code in the body of my html:

<?php
if ($c != "") {
include("content".$c.".php");
} else {
include("content1.php");
}
?>

everytime I click the link, the page refreshes.....

So is there a work around so that when I click the link it loads the new content, I need it to work exactly like an iFrame....suggestions??

Thanks a million!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

register globals are off, which they shoudl be.. $_GET['c'] is where the data will be.. HOWEVER, that is VERY VERY VERY insecure code.. validate the file they are requesting, compare it against a list of ones you consider valid.
Post Reply