How to write code to be able to download the files using the get method?
I am using the address like : http://localhost/songs.php?sid=1
I am able to retireve the data from the database using this GET but I want that the song should immediately be available for download. Nothing should be displayed.
the mysql table i'm using :
tablename : song
table fields :
- songid
songname
songurl
Code: Select all
<?php
include('connection.php');
$songid=$_GET['sid'];
$query=sprintf("SELECT * FROM songid where songid = %d",$songid);
$result=mysql_query($query);
while ($row = mysql_fetch_array($result))
{
[color=#FF0000][b]"What should I write here so that the song's download starts"[/b][/color]
}
mysql_free_result($result);
?>