-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyform.php
50 lines (47 loc) · 1.23 KB
/
myform.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang="en">
<head>
<title>Pawan Xml</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="images/favicon.png">
</head>
<body>
<?php
if (isset($_POST['spawan'])) {
$xml=simplexml_load_file("xml/userfilldata.xml") or die("Error: Cannot create object");
foreach ($xml->user as $message) {
$ce=$message->attributes()->email;
if ($ce==$_POST['email']) { ?>
<br><br><br>
<label> email :- </label><br>
<input type="text" value="<?php echo $_POST['email']; ?>" readonly>
<br><br><br>
<label> Radio :- </label><br>
<input type="text" value="<?php echo$message->radio; ?>" readonly>
<br><br><br>
<label> Checkboxs :- </label><br>
<input type="text" value="<?php echo$message->checkbox; ?>" readonly>
<br><br><br>
<label> Dropdown :- </label><br>
<input type="text" value="<?php echo$message->dropdown; ?>" readonly>
<br><br><br>
<?php break;
}
else {
echo "enter right mail";
}
}
}
?>
<hr>
<br>
<br>
<form method="post">
<input type="email" name="email" placeholder="enter mail for checking data" required>
<br>
<br>
<button type="submit" name="spawan">
show data
</button>
</form></body></html>