forked from aniket-cr/research-bros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
57 lines (53 loc) · 1.32 KB
/
profile.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>User Profile</title>
<?php
session_start();
ob_start();
?>
<script language="javascript" src="ajaxProfile.js">
</script>
<script language="javascript">
function initialDisplay()
{
var email = '<?php echo $_SESSION['email']; ?>';
console.log(email);
initialDisplayArg(email);
}
window.onload = initialDisplay();
function editName()
{
var email = '<?php echo $_SESSION['email'] ?>';
var name = document.getElementById("nameField").value;
editNameArg(email,name);
return true;
}
function editContact()
{
var email = '<?php echo $_SESSION['email'] ?>';
var contact = document.getElementById("contactField").value;
editContactArg(email,contact);
return true;
}
function editAddress()
{
var email = '<?php echo $_SESSION['email'] ?>';
var address = document.getElementById("addressField").value;
console.log(address);
editAddressArg(email,address);
return true;
}
</script>
</head>
<body>
<input type="text" name="email" id="emailField"/><br>
<input type="text" name="name" id="nameField"/>
<button onClick="return editName();">save</button><br>
<input type="text" name="contact" id="contactField"/>
<button onClick="return editContact();">save</button><br>
<input type="text" name="address" id="addressField"/>
<button onClick="return editAddress();">save</button>
</body>
</html>