To upload a CV or Resume file (image, Word or PDF etc), we need to make one PHP file and one folder for storing the pictures.

Upload CV code in PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <?php $connction=mysqli_connect("localhost","root",""); mysqli_select_db($connction,"uploadCV"); if(isset($_REQUEST["submit"])) { $file=$_FILES["file"]["name"]; $tmp_name=$_FILES["file"]["tmp_name"]; $path="images/".$file; $file1=explode(".",$file); $ext=$file1[1]; $allowed=array("pdf","wmv","png","gif","pdf","zip","jpg"); if(in_array($ext,$allowed)) { move_uploaded_file($tmp_name,$path); mysqli_query($connction,"insert into store(file)values('$file')"); } } ?> <form enctype="multipart/form-data" method="post"> File Upload:<input type="file" name="file"> <input type="submit" name="submit" value="upload"> </form> |
Database View for Uploading CV in Database Table using Mysql and PHP.

Here, “uploadCV” is the database. “store” is the table name. Similarly, the file is the attribute of the table, and the table is named as a store.