Advertisement
GWibisono

perbaikan

Dec 13th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <?php
  2.  
  3. if($_GET['id']==null){
  4.     header('location:a.php');}
  5. else
  6. {
  7.     $id=$_GET['id'];
  8.  
  9.     $koneksi=mysqli_connect("localhost","root","","belajar");
  10.     $lihat=mysqli_query($koneksi,"select * from contoh where id='$id'");
  11.     if($lihat){
  12.         $row=mysqli_fetch_array($lihat);
  13.         echo $row['nama'];
  14.     }else{
  15.         echo mysqli_error();
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement