Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Build a Simple PHP Application Creating the Menu and Footer Variables and Conditionals

Glen McAllister
Glen McAllister
3,878 Points

Simple PHP App: Creating Menu & Footer: Code Challenge 3/4: Preview not working

So - when I add the code for this challenge (which is a simple conditional to only echo out a paragraph if my fave flavour of ice-cream is the same as Randy's), I do what it says & preview it & it doesn't work; i.e the para is echoed. However, when I run the code in a separate page in my browser it does work (para not echoed) and when I just go ahead & Check my Work sans preview, it says I'm doing great.

Anyone else get this?

1 Answer

Hi Glen,

Did you hit the "refresh" button after you hit the "preview" button. The "refresh" button in the challenge not your browser refresh button.

I just tried it and it correctly removes the Randy statement for task 3.

Glen McAllister
Glen McAllister
3,878 Points

No - I didn't. I don't even recall seeing a refresh button. Nor do I recall a refresh button in any other code challenge I've taken on Treehouse. That code challenge was also incorrect in the next step when this time, the code did disappear when it wasn't supposed to. I suppose that's consistent with it being a step behind due to my not refreshing it from last time.

Doesn't matter - I know I did it correctly as I verified it in my own environment. I'll look out for the refresh next time, although (again) I think Treehouse should point these things out. Randy seems a bit remiss in this area so far. I've worked on Guil & Nick's stuff & things went relatively smoothly on their stuff.

Thanks,

GAM