title: Loading a php file in a cordova ios app from a server
body: <p>The code works fine in the browser the images load. However in the app PHP file is loaded but the images appear broken. Any text I add to the PHP is fine just the images are broken.</p>
  
  <p>Here's my PHP code.</p>
  
  <p></p>
  
  <pre><code>&lt;html&gt;
  &lt;?php
  include("mysqlconnect.php");
  
  $select_query = "SELECT `ImagesPath` FROM `offerstbl` ORDER by `ImagesId` DESC";
  $sql = mysql_query($select_query) or die(mysql_error());   
  while($row = mysql_fetch_array($sql,MYSQL_BOTH)){
  
  ?&gt; 
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  
  
  &lt;img src="&lt;?php echo $row["ImagesPath"]; ?&gt;" width="100" height="100"/&gt;&lt;/li&gt;
  
  &lt;?php
  
  
  }
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here's the code for the app in cordova.</p>
  
  <pre><code>    &lt;html&gt;
      &lt;head&gt;
      &lt;script&gt;
      function showUser(str) {
          if (str=="") {
              document.getElementById("images").innerHTML="";
              return;
          }
          if (window.XMLHttpRequest) {
              // code for IE7+, Firefox, Chrome, Opera, Safari
              xmlhttp=new XMLHttpRequest();
          } else { // code for IE6, IE5
              xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
          xmlhttp.onreadystatechange=function() {
              if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) {
                  document.getElementById("images").innerHTML=xmlhttp.responseText;
              }
          }
          xmlhttp.open("GET","http://example/view.php");
          xmlhttp.send();
      }
      &lt;/script&gt;
      &lt;/head&gt;
  
  
       &lt;body onload="showUser()"&gt;
  
          &lt;div id="images"&gt;&lt;/div&gt;
  
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>