anchor.diff:  
   <t:header title="Product Order"/>
   	<%
  -			//redirect if not logged in
  -			String uid = "" + session.getAttribute("uid");
  -			if(uid.equals("null")) 
  +			String error = "" + request.getAttribute("error");
  +			if (error.equals("yes"))
   			{
  -				response.sendRedirect("login.jsp");
  +				%>
  +				<h1>Error: Request Is Invalid</h1>
  +				<%
   			}
  +			else 
  +			{
  +				//redirect if not logged in
  +				String uid = "" + session.getAttribute("uid");
  +				
  +				if(uid.equals("null"))
  +					response.sendRedirect("login.jsp");
  +			}
  +			
   			
   			//indicate error if page is arrived at by accidental refresh, back button, or directly without selecting "add to cart"
  -			String order = "" + session.getAttribute("order");
  -			if (order.equals("true") == false)
  -			{
  -	%>
  -					<h1>Error: Request is invalid</h1>
  -					<form action="product_browsing.jsp">
  -						<input type="submit" value="Back to Browsing">
  -					</form>
  -	<%
  -			}
  -			
  -			else
  -			{
  -			
  -				session.setAttribute("order", "false");
   		
   				Connection conn = null;
   				PreparedStatement pstmt1 = null;
  
positive.code: 				String product = "" + request.getParameter("product");
  				String action = "" + request.getParameter("action");
  				int quantity;
  		
  				try
  				{
  					//Collect parameters: need user id and product sku to show user's cart as well as add to it
  
negative.code: 							rs4.close();
  					}
  				}
  		%>
  		
  <t:footer />