Jump to content

markspencer

Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

markspencer's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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 news WHERE 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] <?php include('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; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.