<?php
include('../headertop.php');
include('../db.php');
//include('../datepicker.php');

$disp = '';
$pagetitle = 'Delete Investment';

date_default_timezone_set('Asia/Kolkata');

if(!isset($_REQUEST['id']))
{
echo '<meta http-equiv="refresh" content="0;URL=viewinvestments.php?sm=Select an investment first to delete it">';
exit;
}

$id = $_REQUEST['id'];

$date =  $_REQUEST['date'];
$date2 = $_REQUEST['date2'];
$investor = $_REQUEST['investor'];

$q = "delete from investments where id='$id'";
mysqli_query($dbcon,$q) or die(mysqli_error($dbcon));

$sm = "Investment information deleted ";

echo '<meta http-equiv="refresh" content="0;URL=viewinvestments2.php?date='.$date.'&date2='.$date2.'&investor='.$investor.'&viewinvestmentssubmit=1&sm='.$sm.'">';



