hi all,....
plz help me.....
hi guyz... i just know how to insert a file into database, but i dont know how to update that file....
here is my code....
<?php
$resume=$_FILES['resume']['name'];
$file=$_FILES['resume']['tmp_name'];
$ext=strstr($resume,".");
//echo "file".$file;
//echo "<br>";
//echo "resume".$resume;
$sql = "SELECT MAX(cnd_id) FROM tbl_candidate";
$res = mysql_query($sql);
$data= mysql_fetch_row($res);
$id = $data[0];
$id = $id+1;
$resumepath = $id.$ext;
//echo $id;
//echo $resumepath;
@move_uploaded_file($file,"http://localhost/tjc%20backup/admin/resume/$resumepath");//file uploading
//echo $email_id;
$sql="INSERT INTO tbl_candidate (title,name,surname,contact_phone,email_id,current_employer,key_skills,current_designation,total_experience,relevant_experience, current_location,location_considered,degree, percentage, current_salary,current_benefits,expected_salary, expected_benefits, notice, reason, availability,remarks,extra_remarks,remarks_date,resume,create_date) VALUES ('$title','$name','$surname','$contact','$email_id1','$crnt_employer','$key_skills','$crnt_designation','$ttl_experience','$rel_experience','$crnt_location',
'$loc_considered1".implode(',',$loc_considered)."','$degree','$percentage','$crnt_salary','$crnt_benefits','$exp_salary','$exp_benefits','$notice','$reason','$availability','$remarks','$ext_remarks','$rem_date','$resumepath',CURDATE())";
$obj->query($sql) or die(mysql_error());
?>