{source}
<!-- You can place html anywhere within the source tags -->


<script language="javascript" type="text/javascript">
// You can place JavaScript like this

</script>
<?php
// You can place PHP like this
$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'];


$position =addslashes($position);
$level=addslashes($level);
$exp=addslashes($exp);
$edulevel=addslashes($edulevel);
$edutype=addslashes($edutype);
$pay=addslashes($pay);
$nofreq=addslashes($nofreq);
$des=addslashes($des);
$dld=addslashes($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("insert into jos_jobpost values ('','$position', '$level', '$exp', '$edulevel', '$edutype', '$pay', '$nofreq', '$des' ,'$dld')");
if($result)
echo "<font size=22>";
echo mysql_affected_rows().'JOB IS Posted ';
echo "</font>";

?>
{/source}

Copyright © 2012 ORDA Ethiopia.
All Rights Reserved.