title: Loading iframe from database
body: <p>I have an iframe in my page in which i wud like to load weblinks from a database which contains a name and the corresponding link, the name is selected through a dropdown. I know we can do that by giving "src" attribute to the option of the name in the dropdown option tag but i want to get it from the database. I'm using Ajax.</p>
  
  <pre><code>&lt;?php
  $q = var_dump($_GET['q']);
  $Marketplace = $_POST['txtHint'];
  $con = mysqli_connect('localhost','Chuk','pass','Login');
  if (!$con) {
  die('Could not connect: ' . mysqli_error($con));
  }
  if(isset($_GET["q"]))
  {
   mysqli_select_db($con,"ajax_demo");
  $sql="SELECT Website FROM Details WHERE ID = '.$q.' AND Marketplace =   '.$Marketplace.'";
  $result = mysqli_query($con,$sql);
   echo "&lt;iframe src=$url'" . $act['Website'] . "'&gt;&lt;/iframe&gt;";
   $url= $row['Website'];
   }
  mysqli_close($con);
   ?&gt;
  </code></pre>