Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $modul=isset($_GET['modul'])?$_GET['modul']:'';
- $id=isset($_GET['id'])?$_GET['id']:'';
- switch ($modul) {
- case 1:
- $sql="SELECT jdl_gallery AS title FROM gallery WHERE id_gallery='$id'";
- break;
- case 2:
- $sql="SELECT judul AS title FROM berita WHERE id_berita='$id'";
- break;
- case 3:
- $sql="SELECT judul_topik AS title FROM topik_forum WHERE id_topik='$id'";
- break;
- case 4:
- $sql="SELECT nama_member AS title FROM member WHERE id_member='$id'";
- break;
- case 5:
- $sql="SELECT nama_kategori AS title FROM kategori WHERE id_kategori='$id'";
- break;
- case 6:
- $sql="SELECT jdl_album AS title FROM album WHERE id_album='$id'";
- break;
- }
- if(isset($sql)){
- $r=mysql_fetch_object($sql);
- }
- echo isset($r->title)?$r->title:"Title Default";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement