0 Replies Latest reply on Jun 7, 2017 11:22 PM by godilo

    unable to retrieve image from my external database

    godilo Level 1

      Hi everyone.

      Please i am struggling to retrieve image from my external database in my phonegap app.  I was able to connect to my external database and retrieved other records but the images are not displaying in my app.  Please anyone help me out to resolve this problem.

       

      Below is my php page that queries the database

       

      getrecord.php

       

      <?php

      require_once("include/newconns2.php");

       

      $q = $_GET['q'];

       

      $sql = $db->query("SELECT * FROM pforumtopics");

      //$sql->execute(array($q));

       

      while($nrow=$sql->fetch(PDO::FETCH_ASSOC)){

         @$imgtopic = $nrow['imgtopic'];

         @$briefs = $nrow['briefs'];

      @$topics = $nrow['topics'];

         echo "<img src='$imgtopic' width='250' height='150' >";

      echo "<div class='colome180'><span class='curme40 themsgs'>$topics</span></div>";

         echo "<div class='colome180'><span class='curme40 themsgs'>$briefs</span></div>";

      }

      ?>