Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-21-2013, 11:26 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › PHP v
« Previous 1 ... 19 20 21 22 23 ... 31 Next »

[Solved] [ASK] Script PHP Untuk Halaman Index

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
Solved [ASK] Script PHP Untuk Halaman Index
01-30-2012, 08:44 AM (This post was last modified: 01-30-2012 09:23 AM by mariachi.)
Post: #1
fuxnbums Offline
Orang Ganteng Stok Pertama
*****
DeMT Team
Posts: 732
Joined: Jun 2011
Reputation: 33
[ASK] Script PHP Untuk Halaman Index
Assalamualaikum Wr. Wb.

Langsung aja ke topik ya master2 ...

ini kode di halaman indexnya ..
PHP Code:
<?php
include('config/koneksi.php'); //mengakses file koneksi, menghubungkan ke database
/*header( 'Location: index.php?pilih=home' ) ; */ //untuk redirect
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PT. Golden Marindo Persada</title>
<link rel="stylesheet" href="css/home.css" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style2 {color: #33CCFF}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body>
    <!-- tempat menu -->
<div id="bg_menu">
        <ul>
            <li><a href="index.php">HOME</a></li>
            <li><a href="index.php?pilih=profile">PROFILE</a></li>
            <li><a href="index.php?pilih=product">PRODUCT</a></li>
            <li><a href="index.php?pilih=contact">CONTACT US</a></li>
        </ul>
</div>


    <!-- tutup menu -->
    
    <!-- kolom search -->
<form action="" method="get" id="search">
       <input name="" type="text" value ="Search.." id="form_search"/>
  <input type="button" value="Go!" class="bt"  />
</form>
    <!-- tutup search -->
    
    <!-- html -->
    
    <!-- tutup html -->
    <!-- php -->
<?php 
      $news 
= $_GET['pilih'];
      switch(
$news){
        case
'home':
          include(
'home.php');
        break;
        case
'profile':
          include(
'profile.php');
        break;
        case
'product':
          include(
'product.php');
        break;
        case
'contact':
           include(
'contact.php');
        break;
        
      }
      echo 
'<div class="clear"></div>
        <div id="footer">
            <div class="text_footer1">
            Copyright &copy; 2012 - <a href="http://smkn3singaraja.sch.id" title="SMKN 3 Singaraja">SMKN 3 Singaraja</a><br />
            All Right Reserved
            </div>
        </div>
    <!-- tutup footer -->
</body>
</html>'
;
exit;
?>

<!-- tutup php -->
      
</body>
</html> 

pas ane akses localhost/[path] , malah ga muncul apa2, alias blank ,
ini gambarnya :
[Image: 87086428.png]
Uploaded with ImageShack.us

padahal ane maunya kayak gini :
[Image: gini.png]
Uploaded with ImageShack.us

tapi kalo mau muncul halaman kyk gambar diatas, ane mesti klik link "HOME" dulu , yg di index.php malah kosong ..

nah , tolong bantu ya master2 ....

Wassalam
Visit this user's website Find all posts by this user
Quote this message in a reply
01-30-2012, 09:06 AM
Post: #2
KillerByte Offline
./Devilz Commander
Posts: 337
Joined: Jan 2012
Reputation: 5
RE: [ASK] Script PHP Untuk Halaman Index
kalo 1 begitu rada pusing, mending susunannya kaya shell c99 aja, lebih gampang sabar
Visit this user's website Find all posts by this user
Quote this message in a reply
01-30-2012, 09:09 AM
Post: #3
fuxnbums Offline
Orang Ganteng Stok Pertama
*****
DeMT Team
Posts: 732
Joined: Jun 2011
Reputation: 33
RE: [ASK] Script PHP Untuk Halaman Index
(01-30-2012 09:06 AM)KillerByte Wrote:  kalo 1 begitu rada pusing, mending susunannya kaya shell c99 aja, lebih gampang sabar

kayak gimana om ??

pencerahannya dong
Visit this user's website Find all posts by this user
Quote this message in a reply
01-30-2012, 09:10 AM
Post: #4
mariachi Away
has been reboot
**
Moderators
Posts: 2,359
Joined: Nov 2010
Reputation: 55
RE: [ASK] Script PHP Untuk Halaman Index
pada perulangan switchnya harus dikasih nilai defaultnya om, jadi bila tidak memenuhi perulangan nilai default itu yang akan dikeluarkan

PHP Code:
<?php 
      $news 
= $_GET['pilih'];
      switch(
$news){
        case
'home':
          include(
'home.php');
        break;
        case
'profile':
          include(
'profile.php');
        break;
        case
'product':
          include(
'product.php');
        break;
        case
'contact':
           include(
'contact.php');
        break;
        default:
            include(
'home.php');
      } 

begitu kira2.... peace
Find all posts by this user
Quote this message in a reply
 Reputed by :  fuxnbums(+1)
01-30-2012, 09:19 AM (This post was last modified: 01-30-2012 09:21 AM by fuxnbums.)
Post: #5
fuxnbums Offline
Orang Ganteng Stok Pertama
*****
DeMT Team
Posts: 732
Joined: Jun 2011
Reputation: 33
RE: [ASK] Script PHP Untuk Halaman Index
(01-30-2012 09:10 AM)t3k0 Wrote:  pada perulangan switchnya harus dikasih nilai defaultnya om, jadi bila tidak memenuhi perulangan nilai default itu yang akan dikeluarkan

PHP Code:
<?php 
      $news 
= $_GET['pilih'];
      switch(
$news){
        case
'home':
          include(
'home.php');
        break;
        case
'profile':
          include(
'profile.php');
        break;
        case
'product':
          include(
'product.php');
        break;
        case
'contact':
           include(
'contact.php');
        break;
        default:
            include(
'home.php');
      } 

begitu kira2.... peace

malah error om ..... ngambek
edit : uda bisa ... makasi om2 ... ketawa ketawa
Visit this user's website Find all posts by this user
Quote this message in a reply
01-30-2012, 09:23 AM
Post: #6
mariachi Away
has been reboot
**
Moderators
Posts: 2,359
Joined: Nov 2010
Reputation: 55
RE: [ASK] Script PHP Untuk Halaman Index
ane solved yah.... ketawa
Find all posts by this user
Quote this message in a reply
01-30-2012, 10:52 AM
Post: #7
Killu4 Away
./Devilz Advisor
Posts: 744
Joined: Nov 2011
Reputation: 16
RE: [ASK] Script PHP Untuk Halaman Index
Wow udh solved,ane ijin menyimak aja yaa om ketawa
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Ask] Ada Gk script auto unfollow all following? wildan123456 12 138 05-14-2013 12:58 PM
Last Post: Coziboy
  [Tutor] PHP untuk pemula bagian 1 777r 9 209 05-06-2013 03:47 PM
Last Post: Motaro Irhaby
  [Tutor] script untuk import excel ke MySQL dellacroug 9 146 04-29-2013 11:33 AM
Last Post: Sixmart
  [Ask] Script file zip selalu muncul peringantan "Class 'ZipArchive' not found" Tamp4h 6 103 04-23-2013 11:04 AM
Last Post: Tamp4h
  Index Sub-Forum PHP kidofdream 15 932 04-07-2013 05:21 PM
Last Post: kidofdream
Question [Solved] Fungsi Untuk PHP Shell abuabu_hat10 6 179 03-12-2013 01:53 PM
Last Post: abuabu_hat10
  [Tutor] [php] Did You Mean PHP Script Google hakimoxz 3 208 02-18-2013 11:50 AM
Last Post: sotbot
Sad [Ask] Mohon bantuanya supaya script leech VinaGet v2.6.3 Final work zard22 5 182 02-12-2013 11:12 PM
Last Post: redhat21
  [Tutor] Dork Mencari Php Script Bot FB :) DC™Rebels 11 483 02-12-2013 07:51 PM
Last Post: eM.eL
  [Tutor] Aplikasi sistem pakar untuk mendiagnosa virus komputer berbasis php hakimoxz 6 265 02-02-2013 03:27 PM
Last Post: dHEL.AGY

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-21-2013, 11:26 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE