Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Programming Help > PHP Programming Help

PHP Programming Help Post any question relating to PHP Programming here and hopefully someone can help.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2008-03-10, 02:15 PM
Junior Member
 
Join Date: Mar 2008
Posts: 1
seadd2005 is on a distinguished road
Default Need Music to default to "on" using php CMS

Hello!

I am using a php/mysql based CMS that has a music feature. Problem is in order to hear the music, you have to click the "music on" link. I want it to default to music on when you hit the site, instead of being off. I have tried just about everything I can, but nothing is working. The best I can do is music on all of the time with no option of being able to turn it off. I am going to copy the code below. Any help is appreciated!

<?
foreach ($_GET as $varible => $value) {
$$varible = $value;
}
foreach ($_POST as $varible => $value) {
$$varible = $value;
}

include_once("include/m.inc.php");


session_register("s_25music");
if ($musicplayer=="on"){
$HTTP_SESSION_VARS["s_25music"]=1;
}else

if ($musicplayer=="off"){
$HTTP_SESSION_VARS["s_25music"]=2;
}else
{
if ($HTTP_SESSION_VARS["s_25music"]!=2);
//$HTTP_SESSION_VARS["s_25music"]=1;
}
if ($config->midi){
if ($HTTP_SESSION_VARS["s_25music"]==1){
//$player="<a href=index.php?musicplayer=off>Music Off";
$player="<a href=index.php?musicplayer=on>Music On";
$music="<embed src=\"midi/$config->midi\" autostart=\"true\" loop=\"true\" width=\"0\" height=\"0\">\n
</embed>\n
<noembed>\n
<bgsound src=\"midi/$config->midi\" loop=\"infinite\">\n
</noembed>\n";
$pg=$music.$pg;
}
else
{
$player="<a href=index.php?musicplayer=off>Music Off";
//$player="<a href=index.php?musicplayer=on>Music On";
}
echo $pg;
}


?>
Reply With Quote
  #2 (permalink)  
Old 2008-03-11, 06:50 PM
Xnuiem's Avatar
Senior Member
 
Join Date: May 2004
Location: DFW, Texas
Posts: 1,104
Xnuiem will become famous soon enough
Send a message via Yahoo to Xnuiem
Default

Uncomment
//$player="<a href=index.php?musicplayer=off>Music Off";

That looks like the link required to be able to turn off the music when it is on.
__________________
I rarely give code examples.
No, I have never used IIS or Windows of any kind as a web server. Get a real OS!
Please don't PM me, I won't respond.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:18 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.