OK I have this code down and the over all effect that it will give is pulling information from a DB. and the url looks like shop.php?cat=".$cat." but I want it to look like shop.php?cat=".$cat."&item=".$item." SO what would I do to add that code
<?php
// This bit is fine
include “connect.php”;
$query = “SELECT * FROM sms_cat”;
$results = mysql_query($query);
// Now here are a few changes, instead of getting the number of rows just fetch the array of results
$num = mysql_fetch_array($results);
if($num > 0){
// Change in the loop
// Set $i = 1
$i = 1;
// Get the submitted cat here coz you do not need it in the while as it will stay the same!
$category = $_GET[‘cat’];
while($i < $num){
$cat = $num[$i,‘cat’];
// I do not know why you need these?
$itemid = $num[$i,’cat’];
$price = $num[$i,’price’];
$name = $num[$i,’name’];
// The if statement is know in the while loop the \\ have gone and \n is replaced with a <br>
if($cat == $category){
echo “<a herf=’shop.php?cat=”.$cat.”’>”.$cat.”</a><br>”;
}
}
}
// Simple!
?>