Moron di rumah danny


Jaman Masih Belajar Bikin Web


Ø  Input Mahasiswa
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("ITT");
mysql_query("insert into mahasiswa(Nim,Nama,kode_Jurusan) values('112070083','Asep','TI')");
?>
Ø  Input Jurusan
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("ITT");
mysql_query("insert into jurusan (Kode_Jurusan,Nama_Jurusan) values('TI','Teknik Industri')");
?>
Ø  Delete
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("ITT");
mysql_query("delete from mahasiswa where Nim='112070083'");
?>
Ø  Update Mahasiswa
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("ITT");
mysql_query("update mhsw set nim='112070083', kode_jurusan='TI' where nama='Asep'");
?>
Ø  Update Jurusan
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("ITT");
mysql_query("update jurusan set nama_jurusan='Teknik Industri' where Kode_Jurusan='TI'");
?>
Ø  Display
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("ITT");
$rs=mysql_query("select *from mahasiswa,jurusan where mahasiswa.Kode_Jurusan=jurusan.Kode_Jurusan");
echo "Nim Nama Kode_Jurusan Nama_Jurusan";
echo "<br>";
while ($data=mysql_fetch_array ($rs))
{
echo $data['Nim']."". $data['Nama']."". $data['Kode_Jurusan']."". $data['Nama_Jurusan'];
echo "<br>";
}
?>

 
Parasadya Paramatatva Cisya © 2012 | Designed by LogosDatabase.com, in collaboration with Credit Card Machines, Corporate Headquarters and Motivational Quotes