-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditform.php
More file actions
35 lines (34 loc) · 857 Bytes
/
Copy patheditform.php
File metadata and controls
35 lines (34 loc) · 857 Bytes
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
<?php
session_start();
if($_SESSION['logged_in'] == true)
{
echo $_SESSION['username'];
echo "<br>";
echo "<a href='logout.php'>Logout</a>";
}
else
{
header("location: index.php");
}
?>
<?php
include('core/config.php');
$id=$_GET['id'];
$result = $db->prepare("SELECT * FROM klass WHERE id= :id");
$result->bindParam(':id', $id);
$result->execute();
for($i=0; $row = $result->fetch(); $i++){
?>
<form action="edit.php" method="POST">
<input type="hidden" name="memids" value="<?php echo $id; ?>" />
Õpetaja<br>
<input type="text" name="klassopetaja" value="<?php echo $row['klassopetaja']; ?>" /><br>
Klass<br>
<input type="text" name="klassklass" value="<?php echo $row['klassklass']; ?>" /><br>
Aine<br>
<input type="text" name="klassaine" value="<?php echo $row['klassaine']; ?>" /><br>
<input type="submit" value="Save" />
</form>
<?php
}
?>