+ All Categories
Home > Documents > Listing Program

Listing Program

Date post: 30-Sep-2015
Category:
Upload: 3v74aje
View: 218 times
Download: 1 times
Share this document with a friend
Description:
listing Program
46
LISTING PROGRAM 1. Form koneksi.php <?PHP $host="localhost"; $user="root"; $pass="password"; $db="ecommerc"; $koneksi=mysql_connect($host,$user,$pass); mysql_select_db($db); $tanggal=date("Y-m-d H:i:s"); if ($koneksi) { //echo "berhasil : )"; }else{ ?><script language="javascript">alert("Gagal Koneksi Database MySql !!")</script><? } ?> 2. Form Index.php <?php session_start(); include "config/koneksi.php"; ?> <!DOCTYPE html> <html lang="en"> <head>
Transcript

LISTING PROGRAM1. Form koneksi.php

alert("Gagal Koneksi Database MySql !!")

2. Form Index.php

PT. Speedline Auto

Previous

Next

Previous

${prevTitle}

Currently

${currentTitle}

Next

${nextTitle}

$(document).ready(function() {

$("tbody tr:odd").addClass("genap");

$("tbody tr:even").addClass("ganjil");

});

function validasi(form){

if (form.nama.value==""){

alert("anda belum mengisikan nama.");

form.nama.focus();

return(false);

}

if(form.alamat.value==""){

alert("anda belum mengisikan alamat.");

form.alamat.focus();

return(false);

}

if(form.telpon.value==""){

alert("anda belum mengisikan telpon.");

form.telepon.focus();

return(false);

}

if(form.email.value==""){

alert("anda belum mengisikan email.");

form.email.focus();

return(false);

}

if(form.kota.value==""){

alert("anda belum mengisikan kota.");

form.kota.focus();

return(false);

}

return(true);

}

function harusangka(jumlah){

var karakter=(jumlah.which)?jumlah.which:event.keyCode

if(karakter > 31 && (karakter < 48 || karakter > 57))

return false;

return true;

}

table {

border: 1px solid #000000;

}

thead th {

background-color: #09C;

color : #000;

font: 80%/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;

}

tbody tr {

font: 80%/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;

}

.genap {

background: #2A2A2A;

}

.ganjil {

background: #6A6A6A;

}

$(function() {

$('#cn-slideshow').slideshow();

});

TOP MODELS


Recommended