Ok, I get what you're saying, but I didn't properly explain the situation.
I'm using sessions to store an array....kind of a very simple shopping cart, I suppose.
The array holds the value of $serial and a quantity - I'm using this statement:
foreach($cart as $serial => $qty){
if($$serial == "0"){
unset($cart[$serial]);
}
$url = "testbed.php?$serial=0";
mysql_connect ('host', 'blah', 'blah');
mysql_select_db ('database');
$query = "SELECT * FROM hmedical_oxygen WHERE oxygen_status=1 AND oxygen_serial = $serial";
$result = mysql_query("$query");
while ($row = mysql_fetch_array($result)){
echo("<tr><td><a href=$url>$row[oxygen_serial]</a></td><td>$row[oxygen_lot]</td><td>$row[oxygen_tank] - $qty</td></tr>");
}
}
Now, I realize that that is convoluted. What I'm trying to do is have the person click on the link and have that value in the array be deleted.
And yes, I've kind of pieced this together from reading a book(which is horrible) and my own randomness so there's no wonder it doesn't work.