Search found 4 matches

by grubstuck
Fri Dec 24, 2004 10:29 am
Forum: PHP - Code
Topic: conditional statement split between includes?
Replies: 7
Views: 932

Revising the structure obviously will work, but this is exactly what I was trying to avoid. I appreciate the answers as I may not have been clear enough about this.
by grubstuck
Fri Dec 24, 2004 1:53 am
Forum: PHP - Code
Topic: conditional statement split between includes?
Replies: 7
Views: 932

nope

see in my example how the conditional statement spans both includes. Opened in the first, and closed in the second, spanning the main content of the page.
by grubstuck
Thu Dec 23, 2004 7:20 pm
Forum: PHP - Code
Topic: conditional statement split between includes?
Replies: 7
Views: 932

rehfeld wrote:

Code: Select all

if (logged in) {
    // show logged in stuff

    // include() something if you want
} else {
    // dont
    // include() something else f you want
}
Now try putting that if statement in one include and the else in another. :D
by grubstuck
Thu Dec 23, 2004 7:03 pm
Forum: PHP - Code
Topic: conditional statement split between includes?
Replies: 7
Views: 932

conditional statement split between includes?

Stupid question... I am taking a currently entirely public site and making some of its content 'private' so that only logged in members can see content. Currently the bulk of code and html is in a header include and a footer include. I'd like to avoid making any changes to the individual pages (the ...