-
Notifications
You must be signed in to change notification settings - Fork 0
/
add.php
36 lines (29 loc) · 942 Bytes
/
add.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
30
31
32
33
34
35
36
<html>
<head>
<?php
//error_reporting(0);//this make browser to report no error
$con = mysqli_connect('localhost','root','');
mysqli_select_db($con,'student');
$name = $_POST['des'];
$link = $_POST['link'];
//$pass = $_POST['password'];
$sql = "insert into info (description,link) values ('$name','$link')";
//if($_POST['submit']){
if(mysqli_query($con, $sql)){
echo "data added successfully";
}
else{
echo "something went wrong";
}
// }
?>
</head>
<body>
<form action="add.php" method="post">
DESCRIPTION: <input type="text" name="des">
LINK: <input type="text" name="link">
<br>
<button type="submit" name="submit">ADD</button>
</form>
</body>
</html>