-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathupdate_author.php
More file actions
97 lines (70 loc) · 3.74 KB
/
Copy pathupdate_author.php
File metadata and controls
97 lines (70 loc) · 3.74 KB
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
89
90
91
92
93
94
95
96
97
<!-- Include Head -->
<?php include "assest/head.php"; ?>
<?php
$author_id = $_GET["id"];
// Get author Data to display
$stmt = $conn->prepare("SELECT * FROM author WHERE author_id = ?");
$stmt->execute([$author_id]);
$author = $stmt->fetch();
?>
<title>Update Author</title>
</head>
<body>
<!-- Header -->
<?php include "assest/header.php" ?>
<!-- Main -->
<main role="main" class="main">
<div class="jumbotron text-center">
<h1 class="display-3 font-weight-normal text-muted">Update Author</h1>
</div>
<div class="container">
<div class="row">
<div class="col-lg-12 mb-4">
<!-- Form -->
<form action="assest/update.php?type=author&id=<?= $author_id ?>&img=<?= $author["author_avatar"] ?>" method="POST" enctype="multipart/form-data">
<div class="form-group">
<label for="authName">Full Name</label>
<input type="text" class="form-control" name="authName" id="authName" value="<?= $author['author_fullname'] ?>">
</div>
<div class="form-group">
<label for="authDesc">Description</label>
<input type="text" class="form-control" name="authDesc" id="authDesc" value="<?= $author['author_desc'] ?>">
</div>
<div class="form-group">
<label for="authEmail">Email</label>
<input type="text" class="form-control" name="authEmail" id="authEmail" value="<?= $author['author_email'] ?>">
</div>
<div class="form-group">
<label for="authImage">Avatar</label>
<div class="custom-file">
<input type="file" class="custom-file-input" name="authImage" id="authImage">
<label class="custom-file-label" for="authImage"> <?= $author['author_avatar'] ?> </label>
</div>
</div>
<div class="my-2" style="width: 200px;">
<img class="w-100 h-auto" src="img/avatar/<?= $author['author_avatar'] ?>" alt="">
</div>
<div class="form-group">
<label for="authTwitter">Twitter Username <span class="text-info">(optional)</span></label>
<input type="text" class="form-control" name="authTwitter" id="authTwitter" value="<?= $author['author_twitter'] ?>">
</div>
<div class="form-group">
<label for="authGithub">Github Username <span class="text-info">(optional)</span></label>
<input type="text" class="form-control" name="authGithub" id="authGithub" value="<?= $author['author_github'] ?>">
</div>
<div class="form-group">
<label for="authLinkedin">Linkedin Username <span class="text-info">(optional)</span></label>
<input type="text" class="form-control" name="authLinkedin" id="authLinkedin" value="<?= $author['author_link'] ?>">
</div>
<div class="text-center">
<button type="submit" name="update" class="btn btn-success btn-lg w-25">Submit</button>
</div>
</form>
</div>
</div>
</div>
</main>
<!-- Footer -->
<!-- <?php include "assest/footer.php" ?> -->
</body>
</html>