Hello everyone.
I have the following code after a search is performed:
//Get the BOL's
$bol = $CompanyID . "BOL";
$bol_get = mysql_query("SELECT * FROM $bol WHERE $wherefield = '$searchvalue'") or die (mysql_error());
$bol_rows = mysql_num_rows($bol_get);
$row_colors="#C5D8DE";
$count_rows="0";
while ($row = mysql_fetch_array($bol_get)) {
$count_rows++;
if ($count_rows%2==0)
{ $row_color="#C5D8DE"; } // Even-numbered rows
else
{ $row_color="#A3DCEC"; } // Odd-numbered rows
$bol_id = $row['BolID'];
$carrier = $row['Carrier'];
$Date = $row['Date'];
$Consignee = $row['Consignee'];
//Get the date display format correct
$date_get = mysql_query("SELECT DATE_FORMAT(Date, '%M %d %Y') AS dates FROM $bol") or die(mysql_error());
$date_got = mysql_fetch_array( $date_get );
$date_display = $date_got['dates'];
//Display the results in the table
echo "<tr bgcolor=" . $row_color . "><td>$bol_id</td><td>$carrier</td><td>$Consignee</td><td>$date_display</td><td><a href='new_bol3.php?bolid=$bol_id'>VIEW/PRINT</a></td></tr>";
}
?>
What I want to do is instead of the dynamic link being
new_bol3.php?bolid=$bol_id
I would like to create a session:
session_register(bolid);
$_SESSION['bolid'] = $bolid";
echo "<meta http-equiv=refresh content=0;url=new_bol3.php>";
Can anyone think of a way to do this? The only thing I can think of is creating a form with submit buttons for each result instead of the link, but I don't know how I would set that up in the header with an unknown amount of submit buttons.
Thanks,
Johnie Karr
Data Management Technologies
www.datamt.org