forked from aniket-cr/research-bros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlabs.php
44 lines (42 loc) · 913 Bytes
/
labs.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Edit labs</title>
<?php
session_start();
ob_start();
?>
<script language="javascript" src="ajaxLab.js">
</script>
<script language="javascript">
function addLab()
{
var name = document.getElementById("nameField").value;
var description = document.getElementById("descriptionField").value;
var emailID = "<?php echo $_SESSION['email']; ?>";
addLabArg(emailID,name,description);
displayLabsArg(emailID);
}
function displayLabs()
{
var emailID = "<?php echo $_SESSION['email']; ?>";
displayLabsArg(emailID);
}
window.onload = displayLabs();
</script>
</head>
<body>
<?php
//add lab option
?>
Lab name : <input type="text" name="name" id="nameField"/><br>
Description : <textarea name="description" id="descriptionField"></textarea>
<button onClick="addLab();">add</button>
<?php
//display all labs
?>
<div id="display_labs">
</div>
</body>
</html>