markspencer Posted February 27, 2006 Share Posted February 27, 2006 why does the images that is saved in the database is not displaying when i upload it in a free webhosting..?but in my Computer..localhost...it displays the pictures...here is my code:[b]story.php[/b]<?php//check for record id if ((!isset($_GET['id']) || trim($_GET['id']) =='')) { die('missing record!'); }include('conf.php');$connection = mysql_connect ($host, $user,$pass)or die ('unable to connect');mysql_select_db($db) or die ('unable to select database');$id = $_GET['id'];$query = "SELECT title, pic, content FROM newsWHERE id = '$id'";$result = mysql_query($query)or die ("Error in query : $query. " . mysql_error());$row = mysql_fetch_object ($result);?> <?php echo "<img src='story2.php?id=$id' width=100 height=100 border=1>";?>[b]story2.php(this is use to call the image)[/b]<?phpinclude('conf.php');$connection = mysql_connect ($host, $user,$pass)or die ('unable to connect');mysql_select_db($db) or die ('unable to select database'); $query = "select pic,title from news where id='$id'"; $result = @MYSQL_QUERY($query); $data = @MYSQL_RESULT($result,0,"pic"); $type = @MYSQL_RESULT($result,0,"title"); echo $data; ?> Quote Link to comment https://forums.phpfreaks.com/topic/3662-images-that-is-saved-in-the-database-is-not-displaying-when-i-upload-it-in-a-free-webhosting/ Share on other sites More sharing options...
markspencer Posted February 27, 2006 Author Share Posted February 27, 2006 help me pls............... Quote Link to comment https://forums.phpfreaks.com/topic/3662-images-that-is-saved-in-the-database-is-not-displaying-when-i-upload-it-in-a-free-webhosting/#findComment-12766 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.