<?php
// include top
include $path_to.'top.inc.php';
$date_today=date("Y-m-d");
///////////////////////////////////////Add Application////////////////////////////////
if(move_uploaded_file($_FILES["txt_resume_file"]["tmp_name"],"application/".time()."_".$_FILES["txt_resume_file"]["name"]))
{
$sql="insert into ty_application(id_job,resume_file)values('$_POST[txt_id_job]','".time()._.$_FILES["txt_resume_file"]["name"]."')";
$q=mysql_query($sql) or die (mysql_error());
}
if($q){
$sql_confirm="select id from ty_application order by id desc";
$query=mysql_query($sql_confirm) or die (mysql_error());
while($rec_confirm=mysql_fetch_assoc($query)){
header("Location:application_confirm.php?confirm=$rec_confirm[id]");
exit();
}
}
?>