title: href to a database field link.
body: <p>Im creating my website <a href="http://www.xclo.mobi/xclo2/list.php?id=FREE" rel="nofollow">FOUND HERE</a></p>
  
  <p><em>(this page is a result of clicking on the free tab at the bottom of my home page <a href="http://www.xclo.mobi/xclo2/" rel="nofollow">found here</a>)</em></p>
  
  <p>as you can see on this page there are 2 fields stored on the database. GIFFGAFF &amp; O2. It successfully reads the promo_image, promo_title, promo_content from my mobi table on my database. </p>
  
  <p>However: <strong>When you hit the GO button it is supose to link you to the site stored in promo_link in the same table for this offer.</strong> </p>
  
  <p>It does not do that. But it loads the same page in a new tab (due to the _blank code). </p>
  
  <p>my code for this page is:</p>
  
  <pre><code>&lt;?php
  
  include_once('include/connection.php');
  include_once('include/article.php');
  
  $article = new article();
  
  
  if(isset($_GET['id'])) {
     $id = $_GET['id'];
  $data = $article-&gt;fetch_data($id);
  
  if ($param){
      echo '&lt;div&gt;' . $data["bla"] . '&lt;/div&gt;';
  }
  
  $articles = $article-&gt;fetch_all();
  
  ?&gt;
  
  &lt;html&gt;
  
  &lt;head&gt;
  &lt;title&gt;xclo mobi&lt;/title&gt;
  &lt;link rel="stylesheet" href="other.css" /&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;?php include_once('header.php'); ?&gt;
  
  
  &lt;div class="container"&gt;
  &lt;a href="index.php" id="logo"&gt;Category = ???&lt;/a&gt;
  
  
      &lt;?php foreach ($articles as $article) { 
      if ($article['promo_cat'] === $_GET['id']) { ?&gt;
  
  
  &lt;div class="border"&gt;
  &lt;a href="single.php?id=&lt;?php echo $article['promo_title']; ?&gt;" style="text-decoration: none"&gt;
  &lt;img src="&lt;?php echo $article['promo_image']; ?&gt;" border="0" class="img" align="left"&gt;&lt;br /&gt;
  
  
  &lt;a href="&lt;?php echo $data['promo_link']; ?&gt;" target="_blank"&gt;&lt;img alt="" title="" src="GO.png" height="50" width="50" align="right" /&gt;&lt;/a&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
      &lt;?PHP echo '&lt;div class="title"&gt;' . $article['promo_title'] . '&lt;/div&gt;'; ?&gt;
  &lt;br /&gt;
  
  &lt;font class="content"&gt;&lt;em&gt;&lt;center&gt;&lt;?php echo $article['promo_content']; ?&gt;&lt;/center&gt;&lt;/em&gt;&lt;/font&gt;
  
  &lt;/div&gt;&lt;br/&gt;&lt;br /&gt;
  
            &lt;/a&gt;
  
   &lt;?php } } } ?&gt;
  
  &lt;/div&gt;
  &lt;?php include_once('footer.php'); ?&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>however: if you click on one of the logos and be diverted to the single.php page and click the same go button on that page it works. </p>
  
  <p>my code for the working single.php page is this. </p>
  
  <pre><code>&lt;?php
  
  include_once('include/connection.php');
  include_once('include/article.php');
  
  $article = new article;
  
  if(isset($_GET['id'])) {
     $id = $_GET['id'];
  $data = $article-&gt;fetch_data($id);
  
  ?&gt;
  
  &lt;html&gt;
  
  &lt;head&gt;
  &lt;title&gt;Xclo Mobi&lt;/title&gt;
  &lt;link rel="stylesheet" href="other.css" /&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;?php include_once('header.php'); ?&gt;
  
  
  &lt;div class="container"&gt;
  &lt;a href="index.php" id="logo"&gt;Title Page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
  
  &lt;div align="center"&gt;
  &lt;img src="&lt;?php echo $data['promo_image']; ?&gt;" class="img"&gt;&lt;br /&gt;
  
  &lt;font class="title"&gt;&lt;?php echo $data['promo_title']; ?&gt;&lt;/font&gt;
  
  
  &lt;p&gt;
  &lt;center&gt;&lt;?php echo $data['promo_content']; ?&gt;&lt;/center&gt;
  
  
  &lt;a href="&lt;?php echo $data['promo_link']; ?&gt;" target="_blank"&gt;&lt;img alt="" title="" src="GO.png" height="50" width="50" align="right" /&gt;&lt;/a&gt;
  
  &lt;br /&gt;&lt;br /&gt;
  &lt;b&gt;&lt;u&gt;More From This Brand&lt;/b&gt;&lt;/u&gt;
  
  &lt;br /&gt;&lt;br /&gt;
  
  
  &lt;a href="index.php"&gt;&amp;larr; Home&lt;/a&gt;
  
  &lt;/div&gt;
  &lt;?php include_once('footer.php'); ?&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  
  
  
  &lt;?php
  } else { 
   header('location: index.php');
   exit();
  }
  
  ?&gt;
  </code></pre>
  
  <p><strong>Please can someone tell me why the list.php page does not work correctly?</strong> thank you. </p>
  
  <p>kevstarlive</p>