-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforms.php
More file actions
69 lines (53 loc) · 1.54 KB
/
forms.php
File metadata and controls
69 lines (53 loc) · 1.54 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
63
64
65
66
67
68
69
<!DOCTYPE html>
<html >
<head>
<link href="Csss.css" rel="stylesheet" >
</head>
<body>
<?php
$servername ="localhost:3306";
$username ="ippdf";
$password ="oraX@2030";
$dbname = "admin_ippdf";
//الاتصال بقاعدة البيانات
$conn = new mysqli($servername, $username, $password, $dbname);
$col =$_POST["name1"];
$Rest =$_POST["Phone"];
$Pass =$_POST["Password"]
?>
<div class="div1">
<b>
welcome to my website
</b>
<br><br><br><br>
</div>
<div class="form">
<form action="forms.php" method="post">
Name:<input type="text" name="name1"required>
<br><br><br>
Phone:<input type="text" name="Phone" required>
<br><br><br><br>
Password:<input type="password" name="Password"required>
<br><br><br><br>
<input type="submit" >
</form>
</div>
<?php
$sql ="INSERT INTO userdata (Name, Phone, Pass ) VALUES ('$col' ,'$Rest' ,'$Pass')";
mysqli_query($conn,$sql);
?>
<?php
$stmt = $conn->prepare("select * from userdata");
$stmt->execute();
$result =$stmt->get_result();
echo "<table ";
while($row = $result ->fetch_assoc()){
echo "<tr><td>".$row['Name']."</td><td>".$row['Phone']."</td><td>".$row['date']."</td></tr>";
}
echo "</table>"
?>
<footer>
End !
</footer>
</body>
</html>