Pendaftaran
Mahasiswa Baru
Disini saya ingin membagikan
sedikit hasil karya saya
Script HTML Sublime Text tentang Pendaftaran Mahasiswa Baru yang sangat
sederhana ini,
Buat folder di folder xampp > htdoc > dengan nama
folder Pendaftaran_Mahasiswa_Baru
Kemudian buat folder image > di script ini nama image saya
buat: header.pnp, kampus.jpg, ikmi.png
Buat folder inc >
di dalam folder ini yang isinya script2 di bawa ini :
Sobat buat script koneksi.php dengan script di bawah ini :
<?php
mysql_connect("localhost","root","")
or die (mysql_error());
mysql_select_db("db_mhs") or die (mysql_error());
?>
Sebagai contoh saya buat stmik ikmi Cirebon sebagai kampus
untuk pendaftaran mahasiswanya, oke sobat langsung saja buat script dengan nama
beranda.html scriptnya di bawah ini :
(script beranda.html)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<title>Beranda</title>
<link
rel="stylesheet" type="text/css" href="style.css"
/>
</head>
<body>
<div id="container">
<div
class="fix-container"></div>
<div id="atas">
<div
class="header-image">
<img
src="image/header.png" alt="STMIK IKMI CIREBON" />
</div>
</div>
<div id="isi">
<div id="menulog">
<ul>
<li><a
href="beranda.html">Beranda</a></li>
<li><a
href="login.html">Login</a></li>
<li><a href="form.html">Form</a></li>
</ul>
</div>
<div id="prof">
<h1>Welcome to STMIK IKMI CIREBON</h1>
<div
class="center-image">
<img
src="image/ikmi.png" alt="STMIK IKMI CIREBON" />
</div>
<p>STMIK IKMI
CIREBON hbahdba;oinaojn "CREATED BY : IRWAN IRNAWAN NIM : 41132578 TKJ-B1
SEMESTER V" aijponj'apo ;ajn a/jnadfn adnoaojn padf;n djf'njd'fpo
jpdfojdfj jdpbojdf
m/df
aldfbhluiahbihaoierhbofbahob;o aidf joadfoia joib j;oidfbo;d boihdfbdnfblkdjfb
;dfbij;aoibj;
dfbldfkb;oidfbdf;boidfb boifbodfib;;dfbndfbod hba;
b a;b
a;jaoijbhkv.kj .kjafhveirhuaerepbwbhhqk
qh
qkfhrevqirevhrevrevbervburivrvbrvbirevrverhbiuerire
ooivoerioieeeeeei i
hhiu hierhiherliubhleriuhierhvlieurvperbpionverhuireierh ihr h hr iher oher her rvor
ioirehiehrveruurepwinvervnfhbe erhbihvve;a;av;aheioahebi;hbh bh; bhhbh;f
bhabh;afb fbhf bha;fbhafba;fb h
f;afbffaf;afafb afb
;afobi ;fbab fber brebireb erbyre bryberbi rbyrb</p>
</div>
</div>
<div id="footer">
<h2>Copyright@2016 IRWAN IRNAWAN/41132578 TI TKJ-B1
SEMESTER V</h2>
</div>
</div>
</body>
</html>
Setelah membuat script beranda.html sekarang buat script
beranda.php
(script beranda.php)
<?php
@session_start();
include"inc/koneksi.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<title>Beranda</title>
<link
rel="stylesheet" type="text/css" href="style.css"
/>
</head>
<body>
<div id="container">
<div
class="fix-container"></div>
<div id="atas">
<div
class="header-image">
<img
src="image/header.png" alt="STMIK IKMI CIREBON" />
</div>
</div>
<div id="isi">
<div id="menulog">
<ul>
<li><a
href="beranda.php">Beranda</a></li>
<li><a
href="login.php">Login</a></li>
<li><a
href="form.php">Form</a></li>
</ul>
</div>
<div id="prof">
<h1>Welcome to STMIK IKMI CIREBON</h1>
<div
class="center-image">
<img
src="image/ikmi.png" alt="STMIK IKMI CIREBON" />
</div>
<p>STMIK IKMI
CIREBON hbahdba;oinaojn "CREATED BY : IRWAN IRNAWAN NIM : 41132578 TKJ-B1
SEMESTER V" aijponj'apo ;ajn a/jnadfn adnoaojn padf;n djf'njd'fpo
jpdfojdfj jdpbojdf
m/df
aldfbhluiahbihaoierhbofbahob;o aidf joadfoia joib j;oidfbo;d boihdfbdnfblkdjfb
;dfbij;aoibj;
dfbldfkb;oidfbdf;boidfb boifbodfib;;dfbndfbod hba;
b a;b
a;jaoijbhkv.kj .kjafhveirhuaerepbwbhhqk
qh qkfhrevqirevhrevrevbervburivrvbrvbirevrverhbiuerire
ooivoerioieeeeeei i
hhiu hierhiherliubhleriuhierhvlieurvperbpionverhuireierh ihr h hr iher oher her rvor
ioirehiehrveruurepwinvervnfhbe erhbihvve;a;av;aheioahebi;hbh bh; bhhbh;f
bhabh;afb fbhf bha;fbhafba;fb h
f;afbffaf;afafb afb ;afobi ;fbab fber
brebireb erbyre bryberbi rbyrb</p>
</div>
</div>
<div id="footer">
<h2>Copyright@2016 IRWAN IRNAWAN/41132578 TI TKJ-B1
SEMESTER V</h2>
</div>
</div>
</body>
</html>
Kemudian script form.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<title>form</title>
<link
rel="stylesheet" type="text/css" href="style.css"
/>
</head>
<body>
<div id="container">
<div
class="fix-container"></div>
<div id="atas">
<div
class="header-image">
<img
src="image/header.png" alt="STMIK IKMI CIREBON" />
</div>
</div>
<div id="isi">
<div id="form">
<form action="input.php"
method="post">
<p>
<tr>
<td>Nama</td>
<td>
: <input
type="text" name="nama"> <br></td>
</tr>
</p>
<p>
<tr>
<td>Jenis
Kelamin</td>
<td>
: <input type="radio" name="JK"
value="Laki-laki">Laki-Laki <input type="radio"
name="JK" value="Perempuan" id="text">
Perempuan</td>
</tr>
</p>
<p>
<tr>
<td>Usia</td>
<td>
: <input
type="text" name="usia"> <br></td>
</tr>
</p>
<p>
<tr>
<td>Kota
Asal</td>
<td>
: <input
type="text" name="kotsal"> <br></td>
</tr>
</p>
<<p>
<tr>
<td>Prodi
Yang Ingin Di Pilih</td>
<td>
:
<input
type="radio" name="WST" value="Teknik
Informatika">Teknik Informatika
<input
type="radio" name="WST" value="Management
Informasi" id="text">Management Informasi
<input
type="radio" name="WST" value="Komputer
Akuntansi" id="text">Komputer Akuntansi</td>
</tr>
</p>
<p>
<tr>
<td>Kelas Kuliah Yang Di
Pilih</td>
<td>
:
<input
type="radio" name="SJH" value="Regular"
id="text">Regular
<input type="radio"
name="SJH" value="Non Regular" id="text">Non
Regular</td>
</tr>
</p>
<p>
<tr>
<td>Jenjang
Kuliah Yang Di Pilih </td>
<td>
:
<input
type="radio" name="MKN" value="S1"
id="text">S1
<input type="radio"
name="MKN" value="D3" id="text">D3</td>
</tr>
</p>
<p>
<tr>
<td>Komentar</td>
<td>
: <textarea
"komentar" cols="30" rows="5"
id="komentar"
name="komen"></textarea><br></td>
</tr>
<p>
<input
type="submit" value="Simpan"><br>
</p>
</form>
</div>
</div>
<div id="footer">
<h2>Copyright@2016 IRWAN IRNAWAN/41132578 TI TKJ-B1
SEMESTER V</h2>
</div>
</div>
</body>
</html>
Kemudian buat script form.php
<?php
@session_start();
include"inc/koneksi.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<title>form</title>
<link
rel="stylesheet" type="text/css" href="style.css"
/>
</head>
<body>
<div id="container">
<div
class="fix-container"></div>
<div id="atas">
<div
class="header-image">
<img
src="image/header.png" alt="STMIK IKMI CIREBON" />
</div>
</div>
<div id="isi">
<div id="form">
<form
action="input.php" method="post">
<p>
<tr>
<td>Nama</td>
<td>
: <input
type="text" name="nama"> <br></td>
</tr>
</p>
<p>
<tr>
<td>Jenis
Kelamin</td>
<td>
: <input type="radio" name="JK"
value="Laki-laki">Laki-Laki <input type="radio"
name="JK" value="Perempuan" id="text"> Perempuan</td>
</tr>
</p>
<p>
<tr>
<td>Usia</td>
<td>
: <input
type="text" name="usia"> <br></td>
</tr>
</p>
<p>
<tr>
<td>Kota
Asal</td>
<td>
: <input
type="text" name="kotsal"> <br></td>
</tr>
</p>
<p>
<tr>
<td>Prodi
Yang Ingin Di Pilih</td>
<td>
:
<input
type="radio" name="WST" value="Teknik
Informatika">Teknik Informatika
<input
type="radio" name="WST" value="Management Informasi"
id="text">Management Informasi
<input
type="radio" name="WST" value="Komputer
Akuntansi" id="text">Komputer Akuntansi</td>
</tr>
</p>
<p>
<tr>
<td>Kelas Kuliah Yang Di Pilih</td>
<td>
:
<input type="radio"
name="SJH" value="Regular" id="text">Regular
<input
type="radio" name="SJH" value="Non Regular"
id="text">Non Regular</td>
</tr>
</p>
<p>
<tr>
<td>Jenjang
Kuliah Yang Di Pilih </td>
<td>
:
<input
type="radio" name="MKN" value="S1"
id="text">S1
<input
type="radio" name="MKN" value="D3"
id="text">D3</td>
</tr>
</p>
<p>
<tr>
<td>Komentar</td>
<td>
: <textarea
"komentar" cols="30" rows="5"
id="komentar" name="komen"></textarea><br></td>
</tr>
<p>
<input
type="submit" value="Simpan"><br>
</p>
</form>
</div>
<div
id="menupol">
<div class="form-image">
<img
src="image/kampus.jpeg" alt="kampus" />
</div>
</div>
</div>
<div id="footer">
<h2>Copyright@2016 IRWAN IRNAWAN/41132578 TI TKJ-B1
SEMESTER V</h2>
</div>
</div>
</body>
</html>
Kemudian buat script login.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>input</title>
</head>
<body>
<div id="container">
<div
class="fix-container"></div>
<div id="atas">
<div
class="header-image">
<img
src="image/header.png" alt="STMIK IKMI CIREBON" />
</div>
</div>
<div id="isi">
<div id="masukan">
<?php
echo
"Nama : ". $_POST['nama'];
echo
"<br>";
echo
"<br>";
echo
"Jenis Kelamin : ". $_POST['JK'];
echo
"<br>";
echo
"<br>";
echo
"Usia : ". $_POST['usia'];
echo
"<br>";
echo
"<br>";
echo
"Kota Asal : ". $_POST['kotsal'];
echo
"<br>";
echo
"<br>";
echo
"Prodi Yang Ingin Di Pilih : ".$_POST['WST'];
echo
"<br>";
echo
"<br>";
echo
"Kelas Kuliah Yang Di Pilih : ".$_POST['SJH'];
echo
"<br>";
echo
"<br>";
echo
"Jenjang Kuliah Yang Di Pilih : ".$_POST['MKN'];
echo
"<br>";
echo
"<br>";
echo
"Komentar : ". $_POST['komen'];
?>
</div>
</div>
<div id="footer">
<h2>Copyright@2016 IRWAN IRNAWAN/41132578 TI TKJ-B1
SEMESTER V</h2>
</div>
</div>
</body>
</html>
Kemudian buat script.login.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<title>login</title>
<link
rel="stylesheet" type="text/css" href="style.css"
/>
</head>
<body>
<div id="container">
<div
class="fix-container"></div>
<div id="atas">
<div
class="header-image">
<img
src="image/header.PNG" alt="SMTIK IKMI CIREBON" />
</div>
</div>
<div id="isi">
<div id="login">
<div id="menlogin">
<h3>Login</h3>
<br>
<form
action="" method="post">
<div>
<input
type="text" name="user" placeholder="Username"
class="lg" />
</div>
<br>
<div style="margin-top:10px;">
<input
type="password" name="pass"
placeholder="Password" class="lg" />
</div>
</br>
<div
style="margin-top:10px;">
<input
type="submit" name="login" value="Login"
class="btn" />
</div>
</form>
</br>
</div>
</div>
</div>
<div id="footer">
<h2>IRWAN IRNAWAN/41132578 TKJ-B1 SEMESTER V</h2>
</div>
</div>
</body>
</html>
Kemudian buat script login.php
<?php
@session_start();
include"inc/koneksi.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<title>login</title>
<link
rel="stylesheet" type="text/css" href="style.css"
/>
</head>
<body>
<div id="container">
<div
class="fix-container"></div>
<div id="atas">
<div
class="header-image">
<img
src="image/header.png" alt="STMIK IKMI CIREBON" />
</div>
</div>
<div id="isi">
<div id="login">
<div id="menlogin">
<h3>Login</h3>
<br>
<form
action="" method="post">
<div>
<input
type="text" name="user" placeholder="Username"
class="lg" />
</div>
<br>
<div
style="margin-top:10px;">
<input
type="password" name="pass"
placeholder="Password" class="lg" />
</div>
</br>
<div
style="margin-top:10px;">
<input
type="submit" name="login" value="Login"
class="btn" />
</div>
</form>
<?php
$user= @$_POST['user'];
$pass=
@$_POST['pass'];
$login=
@$_POST['login'];
if($login){
if($user
== "" || $pass == ""){
echo
"Pastikan username dan password telah diisi";
}
else{
$sql
= mysql_query("select * from tb_mhs where username = '$user' and password
= md5('$pass')") or die (mysql_error());
$data
= mysql_fetch_array($sql);
$cek
= mysql_num_rows($sql);
if
($cek >=1){
if
($data['level'] == "admin"){
@$_session['admin']
= $data['kd_user'];
header("location:
form.php");
}
else if ($data['level'] == "operator"){
@$_session['operator']
= $data['kd_user'];
header("location:
form.php");
}
}
else{
echo
"Login Gagal";
}
}
}
?>
</br>
</div>
</div>
</div>
<div id="footer">
<h2>IRWAN
IRNAWAN/41132578 TKJ-B1 SEMESTER V</h2>
</div>
</div>
</body>
</html>
Kemudian buat script style.css
body{
background:#CCC;
margin:0px;
}
#container{
background:#0CF;
width:1350px;
margin:auto;
}
#atas{
background:#03F;
width:1350px;
height:250px;
margin:auto;
}
#menulog{
background:green;
width:250px;
height:630px;
margin:0px;
float:left;
}
ul{
list-style:none;
padding-left:10px;
margin:auto;
}
ul li a{
text-decoration:none;
background-color:#CCC;
color:#000;
float:left;
margin-top:20px;
width:240px;
text-align:center;
padding:5px
0px;
}
ul li a:hover{
background:#333;
color:#FFF;
}
#prof{
background:#FFF;
width:1070px;
height:600px;
margin-left:250px;
padding:15px;
}
h1{
border-bottom:2px
solid #900;
padding-bottom:15px;
}
#prof.center-image{
margin:auto;
}
#prof .center-image img ,#prof. center-image{
width:50px;
}
#login{
background:#FFF;
width:1320px;
height:600px;
margin:0px;
padding:15px;
}
h3{
border-bottom:2px
solid #900;
padding-bottom:15px;
}
#menlogin{
background:#CCC;
width:300px;
height:300px;
margin:auto;
margin-top:50px;
padding:15px;
}
#form{
background:#FFF;
width:1320px;
height:600px;
margin:0px;
padding:15px;
}
#masukan{
background:#0FF;
width:1320px;
height:600px;
margin:0px;
padding:15px;
}
#menupol{
background:#FFF;
width:100px;
height:100px;
border:solid;
float:right;
}
#footer{
background:#036;
color:#FFF;
width:1350px;
height:80px;
text-align:center;
padding-top:5px;
}
Pasti jadi sob hasilnya seperti ini
Terima Kasih selamat mencoba …………………. Sorry banyak banget
*******
Tidak ada komentar:
Posting Komentar