<html>
<head>
<title> Rental Removed </title>
</head>
<body>
<server>
if(request.videoID != null && request.customerID != null)
{
  database.beginTransaction();
  today = new Date();
  cursor = database.cursor("select * from rentals where customerId = " + request.customerID + " AND videoId = " + request.videoID, true);

  while(cursor.next()) {
    cursor.returndate = today;
     cursor.updateRow("rentals");
  }
  database.commitTransaction();

  cursor.close();
}    

redirect("rentals.html");
</server>
</body>
</html>

