Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.