0){ $visit_id = $_GET['visit_id']; } else { $visit_id =-1; } if($_GET['shop_id']>0){ $shop_id = $_GET['shop_id']; } else { $shop_id =-1; } if(isset($_GET['confirm_delete'])){ $confirm_delete = $_GET['confirm_delete']; } else { $confirm_delete ='no'; } $page_delete_yes = $_SERVER['PHP_SELF'] . "?" . htmlentities($_SERVER['QUERY_STRING']) . "&confirm=yes"; if ($shop_id <> 90){ //returns to the shop_log?shop_id page $page_delete_no = PAGE_SHOP_LOG . "?" . htmlentities($_SERVER['QUERY_STRING']); } else { //returns to the individual hours page $page_delete_no = INDIVIDUAL_HOURS_LOG . "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((visit_id <> -1) && (shop_id <> -1) && ($_GET['confirm'] == 'yes')){ $insertSQL = "DELETE FROM shop_hours WHERE shop_visit_id = {$visit_id}"; mysql_select_db($database_YBDB, $YBDB); $Result1 = mysql_query($insertSQL, $YBDB) or die(mysql_error()); $pagegoto = $page_delete_no; header(sprintf("Location: %s", $pagegoto)); //browse back to shop } // end if to delete ?>
Do you really want to delete this visit: