Google

NukeCoder


View next topic
View previous topic
Post new topic   Reply to topic
Author Message
Cobra8007




Joined: May 05, 2005
Posts: 21
Location: Midwest City, Ok

PostPosted: Mon Jun 20, 2005 11:43 am
Reply with quote

Hi everyone !

I use to know how, but I guess I've lost it, LOL. Where would I place an include statement that would play a sound file only when the user first enters the site. I thought about checking the $session variable but I'm not quite sure what to do there.

I would prefer to use an include statement in index.php or mainfile.php but I'm not really sure.

Thanks
Tom
 
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger ICQ Number
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Tue Jun 21, 2005 3:33 pm
Reply with quote

Well one option would be to put it in the index.php, but then it will load everytime the homepage is visited by someone.

Another way would be to set a cookie that tells the script its already been played once and have it expire after an hour or so. This could be put in the header.php, mainfile.php, or footer.php....

good luck
 
View user's profile Send private message Visit poster's website
Cobra8007




Joined: May 05, 2005
Posts: 21
Location: Midwest City, Ok

PostPosted: Tue Jun 21, 2005 5:52 pm
Reply with quote

Did it. had it check if the $user (isset) and works great. Thanks.
 
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger ICQ Number
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 5 Hours
Forums ©