Jump to content

i have problem to get data in home page


raghoo

Recommended Posts

i am writing my own query but i did not getting result

 

<?php

 

$test=$_REQUEST['test'];

$cat_id=$_REQUEST['cat_id'];

if($test!="")

  {

  if(!isset($_GET['act']) || $_GET['act'] != 'play'){

$query="select * from categories where cImage ";

$result=mysql_query($query);

while($data=mysql_fetch_array($result))

{

$values=$data['cName'];

$cat_id=$data['cId'];

 

echo "<br>";

echo "<table width='100%' cellpading='0' cellspacing='0' border='0'>";

echo "<tr>";

echo "<td width='20%' align='left'><a href='products_dis.php?test=test&cat_id=$data[cId]'><img src='images/$data[cImage]' ></a></a><td>";

echo "<td width='80%' align='left' valign='top'>";

 

echo "</table>";

echo "<td>";

echo "</tr> ";

echo "</table>";

}

}

 

}

?>

 

in this i am getting only one image and related url in every category ony one image(test.jpg) and url(test.php)

please help me how to get related image and url to every category.

Link to comment
https://forums.phpfreaks.com/topic/109139-i-have-problem-to-get-data-in-home-page/
Share on other sites

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.