sushantkaura Posted November 11, 2007 Share Posted November 11, 2007 i have a list of songs,any one of thm can b played , which are taken from my database "listen" button is used to open my mp3 player in a new window with the help of java script function "open_win()" echo " <table border='0'> <tr> <th>Creator</th> <th>Name</th> <th>Type</th> <th>Description</th> <th>Date</th> <th>Time</th> <th>Rating</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['UserName'] . "</td>"; echo "<td>" . $row['CName'] . "</td>"; echo "<td>" . $row['Type'] . "</td>"; echo "<td>" . $row['CDescription'] . "</td>"; echo "<td>" . $row['Date'] . "</td>"; echo "<td>" . $row['Time'] . "</td>"; echo "<td>" . $row['Avg'] . "</td>"; //$_SESSION['url']=$row['Url']; echo "<td>"?><input type=button value="Listen" onclick="open_win()"/><?php "</td>"; echo "</tr>"; } echo "</table>"; i want to transfer the "url" of tht song to the player window. i cant use sessions coz every time the same song will be played even if i click a diifernt listen but on of some other song. when a viewer visit tht page , he must be able to listen the corresonding song with the click of the "listen" button. how shuols i proceed. wht other method can be used and how it can be used any1 can help me................. sushant kaura Quote Link to comment Share on other sites More sharing options...
sushantkaura Posted November 11, 2007 Author Share Posted November 11, 2007 just like an online music listening site.... many songs to choose from , n clickin on one song to hear it , and then other to listen to tht one. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted November 11, 2007 Share Posted November 11, 2007 There's really no need to bumb after half an hour. Anyway, it looks like this is more to do with the javscript you're using. I've no idea how that works, so i can't say if it's possible to pass the song url to the player. Hopefully, you could simply add a parameter to your open_win() function, which contains the url. Quote Link to comment Share on other sites More sharing options...
sushantkaura Posted November 11, 2007 Author Share Posted November 11, 2007 cant it be done by $_GET or $_POST method...... ???? ??? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted November 11, 2007 Share Posted November 11, 2007 Well you're not actually submitting a form are you? You're simply using a button which calls a javascript function which creates what, a pop up window? Im sure the best way would be to pass a parameter to your javascript function. Quote Link to comment Share on other sites More sharing options...
murali Posted November 12, 2007 Share Posted November 12, 2007 example : We can pass query string arguments in URL http://www.mysite.com/audioplay.php?songid=1 see this link <a href="http://www.varnammusic.com/html/audioplay.php?id=1">http://www.varnammusic.com/html/audioplay.php?id=1</a> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.