include sometimes

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dru_nasty
Forum Commoner
Posts: 81
Joined: Sat Sep 10, 2005 10:26 am

include sometimes

Post 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
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

What do you mean only sometimes?
dru_nasty
Forum Commoner
Posts: 81
Joined: Sat Sep 10, 2005 10:26 am

Post 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.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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 :)
Post Reply