Skip to content

Instantly share code, notes, and snippets.

View andimariadi's full-sized avatar

Andi Mariadi andimariadi

  • Anak Magang Developers
View GitHub Profile
@andimariadi
andimariadi / styles.css
Created July 6, 2017 00:20
Kode lengkap styles.css cara membuat dropdown dengan html
nav a:hover {
text-decoration: none;
}
nav ul {
list-style: none;
}
nav ul li {
float: left;
padding: 5px 20px;
}
@andimariadi
andimariadi / index.html
Created July 6, 2017 00:16
Cara membuat dropdown menu dengan html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Membuat Dropdown menu navigasi – www.pemulabelajar.com</title>
</head>
<body>
<div class="navigasi">
body{
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; /*Merubah jenis font yang ada didalam body */
font-size:14px; /*Merubah ukuran font yang ada didalam body */
line-height:1.42857143; /*Merubah jarak enter text yang ada didalam body */
color:#333; /*Merubah warna yang ada didalam body */
background-color:#fff; /*Merubah background body */
width: 90%;
margin: 0 auto;
}
body{
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; /*Merubah jenis font yang ada didalam body */
font-size:14px; /*Merubah ukuran font yang ada didalam body */
line-height:1.42857143; /*Merubah jarak enter text yang ada didalam body */
color:#333; /*Merubah warna yang ada didalam body */
background-color:#fff; /*Merubah background body */
width: 90%;
margin: 0 auto;
}
.navigasi {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Membuat Dropdown menu navigasi – www.pemulabelajar.com</title>
<link rel="stylesheet" type="text/css" href="styles.css"/>
</head>
<body>
<?php
session_start();
include 'koneksi.php';
if (!$_SESSION['no']) {
header('location: login.php');
}
$nouser = $_SESSION['no'];
$data = mysql_fetch_array(mysql_query("SELECT * FROM `tb_user` WHERE `no_user`='" . $_SESSION['no'] . "'"));
if (isset($_POST['kirim'])) {
$status = $_POST['status'];
<?php
session_start();
include 'koneksi.php';
if (isset($_POST['login'])) {
$email = $_POST['email'];
$sandi = md5($_POST['sandi']);
$login = mysql_query("SELECT `no_user`, `nama` FROM `tb_user` WHERE `email`='$email' and `sandi`='$sandi'");
if(mysql_num_rows($login)=='0'){
echo '<script>alert(\'Email dan kata sandi salah!\');</script>';
<?php
include 'koneksi.php';
if (isset($_POST['daftar'])) {
if (($_POST['nama']=='') or ($_POST['email']=='') or ($_POST['sandi']=='') or ($_POST['alamat']=='') or ($_POST['tentang']=='')) {
echo '<script>alert(\'Pastikan data diri tidak ada yang kosong!\');history.go(-1);</script>';
} else {
$nama = $_POST['nama'];
$email = $_POST['email'];
$sandi = md5($_POST['sandi']);
$alamat = $_POST['alamat'];
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpassword = '';
$dbname = 'mediasosial';
$koneksi = mysql_connect($dbhost,$dbuser,$dbpassword);
$cek = mysql_select_db($dbname,$koneksi);
if (!$cek) {
echo "Koneksi kedatabase gagal!";
body {
margin: 0 auto;
}
.header {
padding: 15px;
background-color: #2980b9;
color: #fff;
height: 80px;
font-size: 44px;
}