-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsend.php
More file actions
60 lines (52 loc) · 1.85 KB
/
Copy pathsend.php
File metadata and controls
60 lines (52 loc) · 1.85 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
<?php
session_start();
include('dbh.php');
if(isset($_POST['submitcomp'])){
$msg=$_POST['message'];
$name=$_SESSION['name'];
$query="INSERT INTO posts VALUES('0','$msg','$name',NOW())";
$result=mysqli_query($dbc,$query);
mysqli_close($dbc);
header('location:home.php');
}
if(isset($_POST['submitmed'])){
$msg=$_POST['message'];
$name=$_SESSION['name'];
$query="INSERT INTO medicine VALUES('0','$msg','$name',NOW())";
$result=mysqli_query($dbc,$query);
mysqli_close($dbc);
header('location:medicine.php')
;}
if(isset($_POST['submitsci'])){
$msg=$_POST['message'];
$name=$_SESSION['name'];
$query="INSERT INTO science VALUES('0','$msg','$name',NOW())";
$result=mysqli_query($dbc,$query);
mysqli_close($dbc);
header('location:science.php')
;}
if(isset($_POST['submitart'])){
$msg=$_POST['message'];
$name=$_SESSION['name'];
$query="INSERT INTO art VALUES('0','$msg','$name',NOW())";
$result=mysqli_query($dbc,$query);
mysqli_close($dbc);
header('location:art.php')
;}
if(isset($_POST['submitfin'])){
$msg=$_POST['message'];
$name=$_SESSION['name'];
$query="INSERT INTO finance VALUES('0','$msg','$name',NOW())";
$result=mysqli_query($dbc,$query);
mysqli_close($dbc);
header('location:finance.php')
;}
if(isset($_POST['submitother'])){
$msg=$_POST['message'];
$name=$_SESSION['name'];
$query="INSERT INTO other VALUES('0','$msg','$name',NOW())";
$result=mysqli_query($dbc,$query);
mysqli_close($dbc);
header('location:other.php')
;}
?>