Page 1 of 1

include sometimes

Posted: Sun Sep 11, 2005 3:17 pm
by dru_nasty
I'd like to include a flash banner on a php page only sometimes.
Here's the set-up. I've got an admin section for the client to update a part of his site with news, etc. I would like him to be able to check a box or something that will add the banner to that same page. He's a sports handicapper, so he wants a way to show off that he's hot (his picks have been winning).
What's the way to go about this?
Obviously set up a seperate file with just the flash code, and have it as an include(); I'm not sure how to go about this correctly, and I'm very new to php/mySQL. (the site was in place before I began working on it).
If anyone can point me in the right direction.
Thanks :D

Posted: Sun Sep 11, 2005 3:19 pm
by John Cartwright
What do you mean only sometimes?

Posted: Sun Sep 11, 2005 3:26 pm
by dru_nasty
in the admin section, the client has the ability to enter text, click submit, and then that info displays on a page.
I wan't him to have the ability to check a box or something that will include a flashing banner.
He's a sports handicapper, and wants the ability to (when hes hot) click a button that will include a flash banner saying so.

Posted: Sun Sep 11, 2005 7:51 pm
by timvw
Just store the hot-or-not statuscode in your database..

This implies you have to:
- Write a form that lets the user choose if he's hot or not (YES/NO) html select seems appropriate. Update the statuscode with the new submitted value.
- Write a little of code that selects the status from the database. If yes, echo the code for the banner..

I think it should be pretty easy to go from here.. Don't hesitate to come back if you have new questions :)