Re: [thelist] Demon don ¹t like my query strings

Drew Shiel ashiel at sportsinteraction.com
Wed Jun 30 10:12:55 CDT 2004


At 15:18 30/06/2004, Chris Price wrote:
>I want to load different fragments into my profile page using
>profile.php?id=n.
>
>The first line in the page is <?php if (!isset($id)) $id = 1; ?>
>I bring the fragment in with <?php include 'profile'.$id.'.php'; ?>
>The fragments are named profile1.php, profile2.php etc.
>Because it didn't work I tested it with <?php echo $id; ?> and the output is
>always 1.

Before you go the whole bell, book and candle route -

What are the permissions like on the files you're including?

What's the output of <?php echo 'profile'.$id.'.php';; ?> ?

You might find it useful to set the included filename as a variable first, 
and then include it - separating the steps out like that makes it a touch 
easier to debug.

Drew. 
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.712 / Virus Database: 468 - Release Date: 27/06/2004


More information about the thelist mailing list