-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplycompany.php
More file actions
41 lines (28 loc) · 979 Bytes
/
applycompany.php
File metadata and controls
41 lines (28 loc) · 979 Bytes
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
32
33
34
35
36
37
38
39
40
41
<?php
include_once ('dbconnection.php');
$companyName = $_POST['cname'];
$ctc = $_POST['cctc'];
$eligibility = $_POST['celigible'];
$date = $_POST['date'];
$status = 1;
print_r("here");
$jdFile = $_FILES['cjd'];
$jdFileName = $jdFile['name'];
$logoFile = $_FILES['clogo'];
$logoFileName = $logoFile['name'];
$jdFilePath = "jd/" . basename($jdFileName);
$logoFilePath = "logo/" . basename($logoFileName);
if (move_uploaded_file($jdFile['tmp_name'], $jdFilePath)) {
// Move succeed.
} else {
// Move failed. Possible duplicate?
}
if (move_uploaded_file($logoFile['tmp_name'], $logoFilePath)) {
// Move succeed.
} else {
// Move failed. Possible duplicate?
}
$sql = "INSERT INTO company(cname,description,eligibility,ctc,logo,date,status) VALUES ('$companyName','" . mysqli_real_escape_string($conn,$jdFilePath) . "','$eligibility','$ctc','" . mysqli_real_escape_string($conn,$logoFilePath) . "','$date','$status')";
echo $sql."";
$conn->query($sql);
?>