0

I have this code and I want to get the url from a MySQL database.
But the $urls should contain the https:\...xyfile.mp3 URL from the database. can anybody help? It may be a syntax error somewhere.

while($row = mysqli_fetch_assoc($result))
{
    extract($row);
    echo "<tr bgcolor=\"#FED9AF\">\n
    <td width=\"30%\">$artist_name</td>\n
    <td width=\"12%\">$song_name</td>\n
    <td width=\"50%\" align=\"center\">
        <audio controls>
            <source src=\"$url\" type=\"audio/mpeg\">
        </audio>
    </td>\n
    <td width=\"0%\">
        <a href=\"$url\"><img src = '../View/images/download.png'></a>
    </td>\n
    </tr>\n";
}
echo "</table>\n";

Edit: i tried a single audio

<audio controls="controls">  
   <source src="http://torejo.atw.hu/Elektronomia%20-%20Limitless.mp3" />   
</audio>

and Its isn't not working too... ??

Chase
  • 9,289
  • 5
  • 51
  • 77
  • What exactly are you looking for, do you get any errors. – Snm Apr 08 '17 at 12:12
  • @Snm Hello , no i don't have. I have a url calledurl varchar(120) utf8mb4_hungarian_ci in database , and i want to be the source of the audio. ' – Mátyás Katona Apr 08 '17 at 12:33
  • you can give it a try by visiting this link http://stackoverflow.com/questions/2820723/how-to-get-base-url-with-php and check for the function "Fun 'base_url' snippet! " – Snm Apr 08 '17 at 13:00
  • @Snm , Tnaks , but i dont thinks so this is my problem i tried to do it with a singel code , and its isn't working at all. What is the problem with a audio src?? – Mátyás Katona Apr 08 '17 at 13:13

0 Answers0