tags:

views:

29

answers:

2

I'm using a audio in my web page i need to play it first time but not on page refresh in php

+2  A: 

HOW do you play audio?

Apart from that: use a session to save that the page has been loaded and don't play audio on the second load.

Select0r
like this echo "<embed src='templates/".$this->template ."/images/meccaAdhan.mp3' name='guitar' id='BGS_ID' autostart='true' loop='false' width='2' height='0'></embed>";
leonyx
+1  A: 
<?php
 session_start();
 if(!isset($_SESSION['audioplayed'])){
 // add code to play audio
 $_SESSION['audioplayed'] = true;
 }

?>

you just need to store a boolean in SESSION.

VOX
Thanx for helping.... it works now fine
leonyx
I'm glad it's helpful.
VOX