-
Notifications
You must be signed in to change notification settings - Fork 0
/
careers.php
31 lines (27 loc) · 1.23 KB
/
careers.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
require("./mailing/mailfunction.php");
$name = $_POST["name"];
$phone = $_POST['phone'];
$email = $_POST["email"];
$applyfor = $_POST["status"];
$experience = $_POST["experience"];
$otherdetails = $_POST["details"];
$filename = $_FILES["fileToUpload"]["name"];
$filetype = $_FILES["fileToUpload"]["type"];
$filesize = $_FILES["fileToUpload"]["size"];
$tempfile = $_FILES["fileToUpload"]["tmp_name"];
$filenameWithDirectory = "".$name.".pdf"; //give path of tmp-uploads folder(available in this project folder) with slash(/ or \ as per your path) at end of path
$body = "<ul><li>Name: ".$name."</li><li>Phone: ".$phone."</li><li>Email: ".$email."</li><li>Apply For: ".$applyfor."</li><li>Experience: ".$experience." Yrs.</li><li>Resume(Attached Below):</li></ul>";
if(move_uploaded_file($tempfile, $filenameWithDirectory))
{
$status = mailfunction("", "Company", $body, $filenameWithDirectory); //reciever
if($status)
echo '<center><h1>Thanks! We will contact you soon.</h1></center>';
else
echo '<center><h1>Error sending message! Please try again.</h1></center>';
}
else
{
echo "<center><h1>Error uploading file! Please try again.</h1></center>";
}
?>