| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
jorge regula
|
php include
cobbled together this snippet: Code:
Put it in index.php, idea being that if no links are clicked, the page displays home.php where this code is palced. If a link is clicked, it's sposed to load that page, but it doesn't! My links look like index.php?page=background any ideas? |
|
|
|
|
|
#2 (permalink) |
|
Senior Member
|
have you defined $page? eg. PHP Code:
now just: PHP Code:
|
|
|
|
#3 (permalink) |
|
Programmer
Join Date: Jan 2007
Location: UK, Manchester
Posts: 36
|
PHP Code:
Always check if the file exists. |
|
|
|
#5 (permalink) |
|
Spare Parts
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 4,962
|
Here's another trick Pat. (which I have mentioned before) say you want to include a page stuff.htm. the url index.php?page=stuff is not very SEO or user friendly. So create another page stuff.php with the content Code:
|
|
![]() |