Selamat datang,

It looks like you're new here. If you want to get involved, click one of these buttons!

Tolong pilih kategori sesuai, jenis posting (pertanyaan atau bukan) dan sertakan tag/topik yang sesuai misal komputer, php, mysql, dll.
Promosi atau posting tidak pada tempatnya akan kami hapus.
Mencantumkan kode program di posting Anda, tolong ikuti aturan yang sesuai, baca http://diskusiweb.com/discussion/39204/aturan-cara-menyisipkan-kode-program-di-diskusiweb

Baca cara posting gambar/image di post Anda: http://www.diskusiweb.com/discussion/47345/cara-menyisipkan-menyertakan-image-pada-posting/p1

islahudinmly

[Ask][help] bagaimana membuat slider selalu update dari database?.. <?php $server = 'localhost' ; $username = 'root' ; $password = '' ; $database = 'slideshowku' ; // Koneksi dan memilih database di server mysql_connect ( $server , $username , $password ) or die ( 'Koneksi gagal' ) ; mysql_select_db ( $database ) or die ( 'Database tidak bisa dibuka' ) ; $hasilQuery = mysql_query ( "select * from slider" ) ; // kalau hasil query error if ( ! $hasilQuery ) { die ( 'Invalid query: ' . mysql_error ()) ; } // masukkan hasil query ke $gambarArray $i = 0 ; while ( $row = mysql_fetch_assoc ( $hasilQuery )) { $gambarArray [ $i ] = $row ; $i ++; } $jumlahGambar = count ( $gambarArray ) ; mysql_free_result ( $hasilQuery ) ; ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>slide</title> <link rel="stylesheet" type="text/css" href="layout.css"> <script type="text/javascript" src="jquery-2.1.4.min.js"></script> <script src="slider.js"></script>

About

Username
islahudinmly
Joined
Visits
0
Last Active
Roles
Member

Aktivitas

  • islahudinmly
    [Ask][help] bagaimana membuat slider selalu update dari database?.. <?php $server = 'localhost' ; $username = 'root' ; $password = '' ; $database = 'slideshowku' ; // Koneksi dan memilih database di server mysql_connect ( $server , $username , $password ) or die ( 'Koneksi gagal' ) ; mysql_select_db ( $database ) or die ( 'Database tidak bisa dibuka' ) ; $hasilQuery = mysql_query ( "select * from slider" ) ; // kalau hasil query error if ( ! $hasilQuery ) { die ( 'Invalid query: ' . mysql_error ()) ; } // masukkan hasil query ke $gambarArray $i = 0 ; while ( $row = mysql_fetch_assoc ( $hasilQuery )) { $gambarArray [ $i ] = $row ; $i ++; } $jumlahGambar = count ( $gambarArray ) ; mysql_free_result ( $hasilQuery ) ; ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>slide</title> <link rel="stylesheet" type="text/css" href="layout.css"> <script type="text/javascript" src="jquery-2.1.4.min.js"></script> <script src="slider.js"></script>
    September 2015