I am just trying to link a reference numbers using php/mysql
1) Each reference number will select (see code)
2) Post that number to next page and query the info.
How can I post reference ID and query in the page 2.
<?
// Page 1 refno.php
$cid= $_SESSION["c_id"];
extract($_POST);
echo "Receipts <br><br>";
$sql=mysql_query("SELECT DISTINCT r_ref FROM reserve where c_id='$cid'") or die (mysql_error());
while($row = mysql_fetch_array($sql)){
echo "<a href=ref.php>". $row['r_ref']. "</a>"; // post 1001 number to Page 2
echo "<br>";
}
?>
//page 2
$sql=mysql_query("SELECT * FROM reserve WHERE r_ref=1001") or die (mysql_error());
$result = mysql_fetch_array($sql);
echo'Payment:<br> '. $result['r_pay'];