Hi, I have a warning window for a message that appears when the user receives a new message, what I want to do is add sound to this square when it appears, I use the php if statement to check when the user receives a new message, and I tried to add sound by doing the following, but not working, please someone show me how to do this. thank.
<?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( "<embed name='sound_file' src='/assets/music/sound_file.mp3' loop='true' hidden='true' autostart='true'/>"); ?>
source
share