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

$disp = '';
$pagetitle = 'Add New Investor';

if(!isset($_POST['addinvestorsubmit']))
{
echo '<meta http-equiv="refresh" content="0;URL=addinvestor.php">';
exit;
}

$name = $_POST['name'];
$phone = $_POST['phone'];
$address = $_POST['address'];



if(empty($name) or empty($phone) or empty($address))
{
$disp .= '<span class="errordiv">Please go back and fill all required fields</span>';
include('../template.php');
exit;
}


$q = "insert into investor (name,phone,address) values('$name','$phone','$address')";
mysqli_query($dbcon,$q) or die(mysqli_error($dbcon));

//$eid = mysqli_insert_id($dbcon);
$sm = "Investor information saved ";

echo '<meta http-equiv="refresh" content="0;URL=addinvestor.php?sm='.$sm.'">';

