<?php
$user_name = "root";
$pass = "";
$database = "mahasiswa";
$host = "localhost";
$connect_db = mysql_connect ($host,$user_name,$pass);
$find_db = mysql_select_db ($database);
if ($find_db){
$query = "SELECT * FROM data_mahasiswa";
$hasil = mysql_query ($query);
while ($kolom_db = mysql_fetch_assoc ($hasil)){
echo $kolom_db ['nrp']. "<br/>";
echo $kolom_db ['nama']. "<br/>";
echo $kolom_db ['semester']. "<br/>";
echo $kolom_db ['jurusan']. "<br/>";
}
mysql_close ($connect_db);
}
else {
echo "Database Tidak Ada";
mysql_close ($connect_db);
}
?>
Tidak ada komentar:
Posting Komentar