title: play sound clip when php/mysql if statement is true?
body: <p>hi i have a message alert box that appears when a user gets a new message, what i want to do is add sound to this box when it pops up, i am using a php if statement to check when a user gets a new message and i have tried adding sound by doing the following but its not working please can someone show me how to do this. thanks.</p>
  
  <pre><code>&lt;?php
  $check_new_chats = check_new_chats();
  while ($chat = mysql_fetch_array($check_new_chats)) 
  if (isset($_SESSION['user_id'])) { 
          if ($chat['to_user_id'] == $_SESSION['user_id']){ 
          echo( "&lt;embed name='sound_file' src='/assets/music/sound_file.mp3' loop='true' hidden='true' autostart='true'/&gt;"); ?&gt;
  </code></pre>