-
Notifications
You must be signed in to change notification settings - Fork 1
/
sendToProposedProject.php
29 lines (24 loc) · 1019 Bytes
/
sendToProposedProject.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
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "SamajaSathkara";
$conn = new mysqli($servername,$username,$password,$dbname); // making the connection with mysql
if ($conn->connect_error){
die("Connection failed: " . $conn->connect_error);
}
$name=$_POST['name'];
echo "Name: ".$name."<br>";
$pnumber=$_POST['pnumber'];
echo "Your Phone Number: ".$pnumber."<br>";
$email=$_POST['email'];
echo "Your Emali Address: ".$email."<br>";
$description=$_POST['description'];
echo "Description: ".$description."<br>";
$sql = "INSERT INTO proposedprojects(proposername,pnumber,email,description) VALUES ('$name','$pnumber','$email','$description')";
if ($conn->query($sql)===TRUE){
echo "<h3>The project you proposed has been recorded successfully</h3>"."<h3>We will contact you soon..</h3>";
}else{
echo "Error: ". $sql ."<br>" . $conn->error;
}
?>