Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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