Jump to content

Displaying content relating to the offer clicked


Kevstarlive

Recommended Posts

I have a website which can be found here (www.xclo.mobi/xclo2). At the very bottom there are 3 fields. FREE,FREE AND GIFTS.

 

When you click on one of them it displays all 3 offers listed on my database. (GIFFGAFF,O2 and Iwoot.

 

GiffGaff and O2 both have a promo_cat table title of FREE. And the other has GIFTS.

 

My problem is.

 

When you hit FREE. I WANT IT TO ONLY DISPLAY THE 2 FREE FIELDS AND NOT ANY OTHER ONES. The same goes of gifts and any other category that I create.

 

My code for the index page is

 

<?php

 

$article = new article;

$articles = $article->fetch_all();

 

?>

 

 

 

<?php foreach ($articles as $article) { ?>

 

<div id="content">

<a href="list.php?id=<?php echo $article['promo_cat']; ?>">

<li class="button"><ul class="pageitem">

<?php echo $article['promo_cat']; ?>

</li></ul></div>

</a>

 

<?php } ?>

My list.php page is as follows:

 

<?php

 

include_once('include/connection.php');

include_once('include/article.php');

 

$article = new article;

$articles = $article->fetch_all();

 

?>

 

<html>

 

<head>

<title>xclo mobi</title>

<link rel="stylesheet" href="other.css" />

</head>

 

<body>

<?php include_once('header.html'); ?>

 

 

<div class="container">

<a href="index.php" id="logo">Category = ???</a>

 

<ol>

<?php foreach ($articles as $article) { ?>

 

<div class="border">

<a href="single.php?id=<?php echo $article['promo_title']; ?>" style="text-decoration: none">

<img src="<?php echo $article['promo_image']; ?>" border="0" class="img" align="left"><br />

 

 

<a href="<?php echo $data['promo_link']; ?>" target="_blank"><img alt="" title="" src="GO.png" height="50" width="50" align="right" /></a>

 

<font class="title"><em><center><?php echo $article['promo_title']; ?></center></em></font>

 

<br /><br />

 

<font class="content"><em><center><?php echo $article['promo_content']; ?></center></em></font>

 

</div><br/><br />

 

</a>

 

<?php } ?>

</ol>

</div>

</body>

 

</html>

Please can someone help. I'm almost there but can not figure out what to do thank you!

 

Kev

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.