I'm using a audio in my web page i need to play it first time but not on page refresh in php
views:
29answers:
2
+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
2010-05-18 13:06:17
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
2010-05-18 13:08:00
+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
2010-05-18 13:16:00