title: How to show image using php?
body: <p>I am just starting to use html, php, and mysql. I've successfully logged into my database using php, and formed a query. I now want to go a step further and show a picture instead of just strings or numbers.</p>
  
  <p>The variable 'result' will be returning a string that has a url to an image i want to display on this webpage. How would I do this?</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;My First Question&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;?php
  
  $dbhost = 'someURL.com';
  $dbname = 'user';
  $dbuser = 'user';
  $dbpass = 'password';
  
  $mysql_handle = mysql_connect($dbhost, $dbuser, $dbpass)
      or die("Error Connecting To Database Server");
  
  mysql_select_db($dbname, $mysql_handle)
      or die("Error selecting database: $dbname");
  
  echo 'Successfully connected to database!';
  
  $first = 'bobbie';
  
  $query = sprintf("SELECT image FROM Player 
      p WHERE name='%s'", mysql_real_escape_string($first));
  
  $result = mysql_query($query);
  
  mysql_close($mysql_handle);     
  
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>