Why the loop is not working?Playing mp3 file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sumaabey
    New Member
    • Jun 2007
    • 29

    Why the loop is not working?Playing mp3 file

    Thanks in advance.


    [code=php]
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitl ed Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <SCRIPT TYPE="text/javascript">
    <!--
    function soundplay()
    {
    if (navigator.appN ame == "Netscape")
    {
    document.MySoun d.play(false)
    return false;
    }
    else
    return true;
    }
    //-->
    </SCRIPT>
    </head>
    <body>

    <?

    $music=$_GET['music'];

    $dir ="song";



    $dh = opendir($dir);



    while ( !(($file = readdir($dh)) === false) )

    {



    if ($file == "." || $file == "..") continue;



    if (eregi(".wav",$ file))

    {



    echo' <a href="?music=tr ue&file='. $dir . '/' . $file . '" onClick="return soundplay()">'. $file.'</A>';




    }

    }

    if($music == 'true')
    {

    $file = $_GET['file'];


    echo '<EMBED src="'. $dir . '/' . $file . '" NAME="MySound" HEIGHT=144 WIDTH=166 MASTERSOUND HIDDEN >';

    }



    ?>
    </body>
    </html>




    [/code]
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    What exactly is the problem?
    Are you receiving any errors?

    Please take a look at our posting guidelines before posting.
    Posting Guidelines - How to ask a question

    Comment

    • sumaabey
      New Member
      • Jun 2007
      • 29

      #3
      i correct it and thanks for your response

      Comment

      Working...