Jump to content

Search the Community

Showing results for tags 'playing mp3 from database'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi guys i would like to play a mp3 files from my dadabase using jw. this is my table [b]table: audio player[/b] genero_id int(10) AUTO_INCREMENT name varchar(255) [b]table: canciones[/b] cancion_id int(10) AUTO_INCREMENT genero_id int(10) autor varchar(255) titulo_cancion varchar(255) audio varchar(255) I polulate each genre with the following code: <?php mysql_connect("localhost", "audioplayer", "audioplayer") or die(mysql_error()); mysql_select_db("audioplayer") or die(mysql_error()); $limit=3; $count=0; echo"<table border='0' align='center' cellpadding='2' cellspacing='2' width='100%'>"; $query="SELECT genero_id, name from audioplayer"; $result=mysql_query($query); while($row=mysql_fetch_array($result,MYSQL_ASSOC)) { $genero_id = $row['genero_id']; $name = $row['name']; if ($count < $limit) { if($count ==0) { echo"<tr>"; } echo"<td align='center' VALIGN='TOP'><font size='1.2' face='Verdana'><a href=\"index.php?content=cancion&cat=$genero_id\">$name</a></font><br><br></td>"; }else { // $count=0; // echo"</tr><tr VALIGN='TOP'><td align='center'><font size='1.2' face='Verdana'><a href=\"index.php?content=cancion&cat=$genero_id\">$name</a></font><br></td>"; } $count++; } echo"</tr></table>"; ?> Then i would like to get the audio player songs contain in each with this code <HTML> <HEAD> <TITLE>New Document</TITLE> <script type="text/javascript" src="js/audio-player.js"></script> <script type="text/javascript"> AudioPlayer.setup("http://localhost/audioplayer/js/player.swf", { width: 290 }); </script> </HEAD> <BODY> <?php $genero_id = $_GET['cat']; $query = "Select count(cancion_id) from canciones where genero_id = $genero_id"; $result = mysql_query($query); $row = mysql_fetch_array($result); if ($row[0] == 0) { echo "<h2 align='center'><br>Lo Sentimos no hay canciones en este momento</h2>\n"; } else { $sql = mysql_query("SELECT * from canciones WHERE genero_id=$genero_id"); //variable $limit=1; $count=0; echo"<table class='pretty-table' border='0' align='center' cellpadding='2' cellspacing='2' width='90%'>"; while($row = mysql_fetch_array($sql)){ $genero_id = $row['genero_id']; $autor = $row['autor']; $titulo_cancion = $row['titulo_cancion']; $audio = $row['audio']; if ($count < $limit) { if($count ==0) { echo"<tr>"; } //<img src='images/index_27.gif' width='16' height='17' alt='' /> echo"<p id='audioplayer_$cancion_id'>$titulo_cancion</p>"; echo"<script type='text/javascript'>"; AudioPlayer.embed('audioplayer_$cancion_id', {soundFile: 'http://localhost/audioplayer/canciones/$audio.mp3'}); echo"</script>"; echo"<br>"; }else { // $count=0; // echo"<p id='audioplayer_$cancion_id'>$titulo_cancion</p>"; echo"<script type='text/javascript'>"; AudioPlayer.embed('audioplayer_$cancion_id', {soundFile: 'http://localhost/audioplayer/canciones/$audio.mp3'}); echo"</script>"; echo"<br>"; } $count++; } echo"</tr></table>"; } ?> </BODY> </HTML> But i have this error... can help me please Parse error: syntax error, unexpected '{' in C:\wamp\www\audioplayer\cancion.inc.php on line 53 Call Stack # Time Memory Function Location 1 0.0006 367848 {main}( ) ..\index.php:0 Thank you very much in advanced
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.