The way it is stored in database is image/jpeg image/gif etc . What should i do?
Code: Select all
switch ($mime) {
case "image/jpeg":
echo '<img src="'.$row['link'].'" border="0" height="50" width="50" alt="' . $row['title'] .'" />';
Moderator: General Moderators
Code: Select all
switch ($mime) {
case "image/jpeg":
echo '<img src="'.$row['link'].'" border="0" height="50" width="50" alt="' . $row['title'] .'" />';
Code: Select all
list($type, $format) = explode('/', $mime);
switch ($type) {
case "image":
echo '<img src="'.$row['link'].'" border="0" height="50" width="50" alt="' . $row['title'] .'" />';