{source}
<?php
$jid =$_POST['joid'];
$position =$_POST['position'];
$level=$_POST['level'];
$exp=$_POST['Exp'];
$edulevel=$_POST['edulevel'];
$edutype=$_POST['edutype'];
$pay=$_POST['payment'];
$nofreq=$_POST['noofrequired'];
$des=$_POST['des'];
$dld=$_POST['dld'];


$todays_date = date("Y-m-d");
$today = strtotime($todays_date);
$dldate = strtotime($dld);

if (preg_match ("/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/", $dld, $parts)){
if(checkdate($parts[2],$parts[3],$parts[1])){

if ($dldate > $today)
goto a;
else
echo "The deadline date was past so you cannot add past date ,Please insert deadline date after Today's Date";
exit;

}
else{
echo "INvalid date,Check date either the month or day out of boundary 12 months, and 29,30,31 days acoording to months ";
exit;
}

}
else{
echo "date formate is not correct,please insert in this format YYYY-MM-DD";
exit;
}
a:

$db=mysql_pconnect('mysql.etisp.et','ordadb','test@123');

if(!$db)
{
echo 'could not connect to server';
exit;

}
//mysql_select_db('vacancy');
if(!mysql_select_db('ordadb')){
echo 'database not connected';
}

$result=mysql_query("UPDATE jos_jobpost SET j_position='$position', j_level='$level', j_experiance='$exp', j_educationlevel='$edulevel', j_educationtype='$edutype', j_payement='$pay', j_noofrequired='$nofreq', j_description='$des' ,j_deadlinedate='$dld' WHERE j_id='$jid' ");
if($result)
echo "<font size=22>";
echo mysql_affected_rows().'JOB IS Updated ';
echo "</font>";
?>
{/source}

Copyright © 2012 ORDA Ethiopia.
All Rights Reserved.