Professional Documents
Culture Documents
Ujian Akhir Semester Pemograman Komputer
Ujian Akhir Semester Pemograman Komputer
PEMOGRAMAN KOMPUTER
Created By:
Agung Widiantoro 41618110040
Guided By:
Bapak Iwan Roswandi, S.Kom, MT
2
1. Form Login User name = Nama Mahasiswa, Password = NIM
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Form 1</title>
</head>
<body>
</form>
</body>
</html>
3
Coding Proses Versi 1
<?php
if(isset($_POST['Login'])) {
$user = $_POST['username'];
$pass = $_POST['password'];
if($user=="Agung Widiantoro"&&$pass=="41618110040"){
} else {
?>
4
Hasil Input Versi 1
5
Hasil Proses Versi 1
<?php
if(isset($_POST["submit"])){
header("Location:pro_form11.php");
exit;
} else{
$error = true;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Form 1</title>
</head>
<body>
<h1>Login Admin</h1>
<ul>
<li>
</li>
<li>
</li>
</form>
</ul>
</body>
</html>
7
8
Coding Proses Versi 2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Form 1</title>
</head>
<body>
<a href="in_form11.php">Logout</a>
</body>
</html>
9
Hasil Input Versi 2
10
2. Form Data Nama Mahasiswa, NIM, Alamat, Umur, Nilai UTS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Form 2</title>
</head>
<body>
<input type="submit"name="Input"value="Proses">
</form>
</body>
</html>
11
Form Coding Proses Versi 1
<?php
if (isset($_POST['Input'])) {
$nama = $_POST['nama'];
$nim = $_POST['nim'];
$alamat = $_POST['alamat'];
$umur = $_POST['umur'];
$nilai = $_POST['nilai'];
?>
12
Form Hasil Input Versi 1
13
Form Hasil Proses Versi 1
<?php
$mahasiswa = [
],
"nim" =>"41618110041",
],
14
["nama" =>"Agung Ginanjar",
"nim" =>"41618110042",
];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Form 2</title>
</head>
<body>
<ul>
<li>
</a>
</li>
</ul>
</body>
</html>
15
16
Form Coding Proses Versi 2
<?php
if (!isset($_GET["nama"])||
!isset($_GET["nim"])||
!isset($_GET["alamat"])||
!isset($_GET["umur"])||
!isset($_GET["nilai"])) {
// redirect
header("Location: in_form22.php");
exit;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>Detail Indentitas</h1>
<ul>
<li><?="NAMA : $_GET[nama]";?></li>
</ul>
17
18
Form 2 Hasil Input Versi 2
19
3. Form Besar Gaji sesuai NIM
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Gaji Karyawan</title>
</head>
<body>
</form>
</body>
</html>
20
Form Coding Proses
<?php
if(isset($_POST['Input'])) {
$gaji = 41618110040;
$pajak = 0.025;
if($nama=="Agung Widiantoro"&&$gaji=="41618110040"){
echo "<br>";
} else {
}
21
?>
Form Hasil Input
22
Form Hasil Proses
23
4. Form Jurusan yang ada di fakultas Teknik
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pilih Jurusan</title>
</head>
<body>
</form>
</body>
</html>
24
Form Coding Proses
<?php
if(isset($_POST['Pilih'])) {
$jurusan = $_POST['jurusan'];
}?>
25
Form Hasil Input
26
5. Form Mata Kuliah dengan Nilai Terbaik
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
</form>
</body>
</html>
27
Form Coding Proses
<?php
if(isset($_POST['Tampilkan'])) {
if(isset($_POST['matkul1'])) {
echo "*".$_POST['matkul1']."<br>";
if(isset($_POST['matkul2'])) {
echo "*".$_POST['matkul2']."<br>";
if(isset($_POST['matkul3'])) {
echo "*".$_POST['matkul3']."<br>";
if(isset($_POST['matkul4'])) {
echo "*".$_POST['matkul4']."<br>";
28
if(isset($_POST['matkul5'])) {
echo "*".$_POST['matkul5']."<br>";
if(isset($_POST['matkul6'])) {
echo "*".$_POST['matkul6']."<br>";
?>
29
Form Hasil Input
30