I tryed what you said to and I get the same error again. :bemused:
Ok I'm gonna give you all of my code for the two pages, because I edited the code and it worked but it's not the way need it to work.
This is it when it doesn't work.
Page 1:
<?php
// Database Variables
$dbcon[host] = "localhost";
$dbcon[user] = "Kiz";
$dbcon[pass] = "hirur635";
$dbcon[name] = "hireco";
$dbtable[trailer] = "trailers";
$connect = mysql_connect($dbcon[host],$dbcon[user],$dbcon[pass])
or die(mysql_errno().": ".mysql_error());
mysql_select_db($dbcon[name]);
$query = "SELECT DISTINCT type_id, type
FROM $dbtable[trailer]
ORDER BY type_id";
$result = mysql_query($query)
or die(mysql_errno().": ".mysql_error());
$content = "";
while($row=mysql_fetch_array($result)) {
extract($row);
$content .= "<a href=\"browse2.php?type_id=$row[type_id]\">$row[type]</a>";
}
include "temp.php";
?>
Page 2:
<?php
$dbcon[host] = "localhost";
$dbcon[user] = "Kiz";
$dbcon[pass] = "hirur635";
$dbcon[name] = "hireco";
$dbtable[trailer] = "trailers";
$connect = mysql_connect($dbcon[host],$dbcon[user],$dbcon[pass])
or die(mysql_errno().": ".mysql_error());
mysql_select_db($dbcon[name]);
$query = "SELECT type, type_id, price, id
FROM $dbtable[trailer]
WHERE type_id = $type_id";
$result = mysql_query($query)
or die(mysql_errno().": ".mysql_error());
$content = "";
while($row=mysql_fetch_array($result)) {
extract($row);
$id = $row[id];
$content .= "<a href=\"browse3.php?id=$row[id]\">$row[type]</a>: $row[price]";
}
$content .= "<a href=\"javascript:history.go(-1);\">back</a><br/>";
include "temp.php";
?>
Page 3:
<?php
// Database Variables
$dbcon[host] = "localhost";
$dbcon[user] = "Kiz";
$dbcon[pass] = "hirur635";
$dbcon[name] = "hireco";
$dbtable[trailer] = "trailers";
$connect = mysql_connect($dbcon[host],$dbcon[user],$dbcon[pass])
or die(mysql_errno().": ".mysql_error());
mysql_select_db($dbcon[name]);
$query = "SELECT *
FROM $dbtable[trailer]
WHERE id = $id";
$result = mysql_query($query)
or die(mysql_errno().": ".mysql_error());
$content = "";
while($row=mysql_fetch_array($result)) {
extract($row);
$content .= "$row[type]: $row[price]";
}
$content .= "<a href=\"javascript:history.go(-1);\">back</a><br/>";
include "temp.php";
?>
What I did to get it to work was remove
?type_id=$row[type_id]
from the link. I declared
$type_id = 1;
in Page 2 to test if it works or not and it does. So I think what I need to do is find another way of passing the $type_id from Page 1 to Page 2.
Any ideas?