-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdatepro.php
88 lines (83 loc) · 2.53 KB
/
updatepro.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="http://malsup.github.com/jquery.form.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>Update Project</title>
</head>
<style type="text/css">
#update
{
text-align: center;
margin-top: 100px;
font-family: "Trebuchet MS";
}
#button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 10px 22px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-family: "Trebuchet MS";
}
body
{
background-image: url("cmp.jpg");
background-position: center;
background-repeat: no-repeat;
}
#col
{
color: yellow;
font-family: "Trebuchet MS";
}
</style>
<body>
<div id="col">
<hr><h2 align="center">Update Project Details</h2><hr>
<div id="update">
<form id="upd" method="POST" action="pro_update.php">
Enter Project ID:<br>
<input type="text" id="idtext" name="idtext" required><br><br>
<input type="submit" id="button" name="submit" value="Submit"><br><br>
</form>
<form id="show" method="POST" action="pro_update.php">
Enter new Project name:<br>
<input type="text" name="proname" required><br><br>
Enter new start date:<br>
<input type="text" name="start_date" required=""><br><br>
<input type="submit" id="button" name="Submit" value="Submit">
</form>
</div>
</div>
</body>
<script type="text/javascript">
jQuery("#show").hide();
jQuery("#button").click(function(event) {
event.preventDefault();
jQuery("#show").show();
var onvar=$("input#idtext").val();
var dataString='idtext='+ onvar;
$.ajax({
type: "POST",
url: "updatepro.php",
data: dataString,
});
console.log(onvar);
});
</script>
</html>
<?php
error_reporting(0);
$a=$_POST['idtext'];
file_put_contents("file1.txt", $a);
?>