$conn=mysql_connect ("localhost","root","");
if (!$conn){
echo "Error Koneksi";
}else {
mysql_select_db("sistem_kuliah",$conn);
$sql = "select * from mahasiswa";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)){
echo $row["nim"]. "-" . $row["nama"] . "
";
}
}
hasilnya :
0180000536-andri
0280000254-tung desem
085555-indira
0925000-adi
0925000-adi
Jumat, Februari 13, 2009
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar