zarilahr wrote: > > > Dear Sirs > > plzz help me out that i want to create a link to download a image , > mp3 ringtones from a php page. All the images i have stored in mysql > in the folder named images. below is the line i am working out.. > > echo '<td width="' . $colWidth . '%">' . '<img src="images/' . $row > ['image_path'] > > plzzz someone tell me how i put a hyperlink on it that when a user > click on it browser automatically open the default dialogue box to > download teh image. > > As i have stord the images in mysql with image_id (auto increment). > > plzz help me out. > > Regards
You need a function for retrieving the binary and displaying the picture. Here is an example of what I do: function getpic($id){ $q = mysql_query("SELECT contenttype,picture FROM pictures WHERE id = '$id'"); $row = mysql_fetch_assoc($q); header("content-type: {$row['contenttype']}"); echo $row['picture']; // the table column that has the binary picture. } Obviously in the example above, you would need to change the $row to reflect what is in your database. Your html should have this: <img src="blah.php?action=getpic&id=12345"> -William Piper