Skip to content

Commit 6c6fa37

Browse files
authored
Create process.php
1 parent 89a21f0 commit 6c6fa37

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

process.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
error_reporting( E_ALL & ~E_DEPRECATED & ~E_NOTICE );
3+
// Establishing connection with server by passing "server_name", "user_id", "password"
4+
$conn = mysqli_connect("localhost", "root", "","lotus");
5+
6+
// Selecting Database by passing "nightfury" and above connection variable
7+
8+
9+
//Fetching Values from URL
10+
$name =$_POST['Name'];
11+
$msg =$_POST['Message'];
12+
13+
//Insert query
14+
$sql = "insert into trash (name,msg) values ('$name','$msg')";
15+
$query = mysqli_query( $conn,$sql);
16+
if($query){
17+
echo "Working good";
18+
}else echo "error";
19+
20+
// clossing connection
21+
mysqli_close($conn);
22+
?>

0 commit comments

Comments
 (0)