coding
coding
>
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="container">
<div class="logo-container">
</div>
<h2>Data Pribadi</h2>
<label>Nama Lengkap:</label>
<label>Nama Panggilan:</label>
<label>Tanggal Lahir:</label>
<label>Jenis Kelamin:</label>
<option value="L">Laki-laki</option>
<option value="P">Perempuan</option>
</select>
<label>Agama:</label>
<label>Alamat:</label>
<label>Nomor Telepon:</label>
<label>Email:</label>
<label>Nama Ayah:</label>
<label>Nama Ibu:</label>
<label>Pekerjaan Ayah:</label>
<label>Pekerjaan Ibu:</label>
<textarea name="alamat_orang_tua"></textarea>
<h2>Pendidikan Sebelumnya</h2>
<label>Sekolah Asal:</label>
<label>Tahun Lulus:</label>
<label>Program Studi:</label>
<label>Pilihan Kedua:</label>
<h2>Upload Berkas</h2>
<label>Pas Foto:</label>
<label>Ijazah:</label>
<label>Kartu Keluarga:</label>
<button type="submit">Daftar</button>
</form>
</div>
</body>
</html>
/* Umum */
body {
background-color: #f8f9fa;
margin: 0;
padding: 40px;
color: #333;
}
.container {
max-width: 700px;
margin: auto;
background: #fff;
padding: 30px;
border-radius: 10px;
h1, h2 {
text-align: center;
color: #2c3e50;
font-weight: 700;
margin-bottom: 20px;
form {
display: flex;
flex-direction: column;
label {
font-weight: 500;
color: #495057;
}
input[type="text"],
input[type="email"],
input[type="date"],
input[type="file"],
textarea,
select {
padding: 12px;
border-radius: 5px;
margin-bottom: 20px;
font-size: 16px;
background-color: #fdfdfd;
input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus {
border-color: #007bff;
outline: none;
/* Tombol */
button {
padding: 12px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 1px;
button:hover {
background-color: #0056b3;
transform: translateY(-2px);
button:active {
background-color: #004085;
transform: translateY(0);
/* Responsif */
.container {
padding: 20px;
button {
font-size: 14px;
/* Logo Universitas */
.logo-container {
text-align: center;
margin-bottom: 20px;
.logo {
height: auto;
<?php
$dbname = "pendaftaran_mahasiswa";
try {
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
?>
<?php
include 'config.php';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$nama_lengkap = $_POST['nama_lengkap'];
$nama_panggilan = $_POST['nama_panggilan'];
$tanggal_lahir = $_POST['tanggal_lahir'];
$jenis_kelamin = $_POST['jenis_kelamin'];
$agama = $_POST['agama'];
$alamat = $_POST['alamat'];
$no_telepon = $_POST['no_telepon'];
$email = $_POST['email'];
$nama_ayah = $_POST['nama_ayah'];
$nama_ibu = $_POST['nama_ibu'];
$pekerjaan_ayah = $_POST['pekerjaan_ayah'];
$pekerjaan_ibu = $_POST['pekerjaan_ibu'];
$alamat_orang_tua = $_POST['alamat_orang_tua'];
$no_telepon_orang_tua = $_POST['no_telepon_orang_tua'];
$sekolah_asal = $_POST['sekolah_asal'];
$tahun_lulus = $_POST['tahun_lulus'];
$nilai_rata_rata = $_POST['nilai_rata_rata'];
$program_studi = $_POST['program_studi'];
$pilihan_kedua = $_POST['pilihan_kedua'];
$uploads_dir = 'uploads/';
move_uploaded_file($_FILES["pas_foto"]["tmp_name"], $pas_foto);
move_uploaded_file($_FILES["ijazah"]["tmp_name"], $ijazah);
move_uploaded_file($_FILES["kartu_keluarga"]["tmp_name"], $kartu_keluarga);
$stmt->execute([$email]);
$count = $stmt->fetchColumn();
if ($count > 0) {
} else {
$last_id = $conn->lastInsertId();
exit;
} else {
}
?>
<?php
include 'config.php';
if (isset($_GET['id'])) {
$id = $_GET['id'];
$stmt->execute([$id]);
$mahasiswa = $stmt->fetch(PDO::FETCH_ASSOC);
if ($mahasiswa) {
?>
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<title>Bukti Pendaftaran</title>
<style>
body {
padding: 20px;
h1 {
text-align: center;
.container {
max-width: 600px;
margin: auto;
padding: 20px;
border-radius: 5px;
.data {
margin-bottom: 15px;
.data label {
font-weight: bold;
.buttons {
display: flex;
justify-content: space-between;
margin-top: 20px;
</style>
</head>
<body>
<div class="container">
<div class="data">
<label>Nama Lengkap:</label>
</div>
<div class="data">
<label>Nama Panggilan:</label>
<div class="data">
<label>Tanggal Lahir:</label>
</div>
<div class="data">
<label>Jenis Kelamin:</label>
</div>
<div class="data">
<label>Program Studi:</label>
</div>
<div class="data">
<label>Tanggal Pendaftaran:</label>
</div>
<div class="buttons">
<a href="index.php">
</a>
</div>
</div>
</body>
</html>
<?php
} else {
echo "Data tidak ditemukan.";
} else {
?>