I’m trying to create a table with links that return a ‘mf_id’ value and its corresponding ‘Manufacturer’ value. I can do one at a time, but when I try to combine the two, problems begin to crop up. Here’s what I have so far:
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td><a href=\"list.php?mf_id&&Manufacturer=" . $row['mf_id'&&'Manufacturer'] . "\">" . $row['Manufacturer'] . "</a></td>";
echo "</tr>";
}
and the other page:
$numb = $_GET['mf_id'];
$name = $_GET['Manufacturer'];
echo "<h1>$name</h1>";
$result=mysql_query("select * from Products where mf_id=$numb");
Thanks in advance!
You’re only passing mf_id into the page, you are not passing Manufacturer.
Edit (as you’ve changed your code)
Change:
To: