-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathpostnotesfunction.php
More file actions
62 lines (36 loc) · 1.24 KB
/
postnotesfunction.php
File metadata and controls
62 lines (36 loc) · 1.24 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
session_start();
if(isset($_SESSION["user_name"])){
?>
<?php
if(isset($_POST["postnotes"]))
{
$branch=$_SESSION["branch"];
$subject =$_POST["subject"];
$description=$_POST["description"];
$add_pdf = $_FILES['post_image']['name'];
$imagetemp = $_FILES['post_image']['tmp_name'];
$name=$_POST["name"];
$institute=$_POST["institute"];
$mobile=$_POST["mobile"];
$email = $_POST['email'];
if($subject !="" AND $description !="" AND $add_pdf != '' AND $name !="" AND $institute !="" AND $mobile !="" AND $email !="" AND $branch!=""){
include"db.php";
$connectionStatu = connect_db();
move_uploaded_file($imagetemp,"pdf-flipbook-master/images/notes/$add_pdf");;
$status = post_notes($connectionStatu,$subject,$description,$add_pdf,$name,$institute,$mobile,$email,$branch);
if($status==true){
header("Location:notespdf.php?institute=$institute &branch=$branch");
}else { header("Location:postnotes.php?institute=$institute & branch=$branch");
}
}
else { header("Location:postnotes.php?institute=$institute & branch=$branch");
}
}
else { header("Location:postnotes?institute=$institute & branch=$branch");
}
?>
<?php
}else { header("Location:index.php");
}
?>