Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

Need Help, phpnoob here

General discussions related to php

Moderators: macek, egami, gesf

Need Help, phpnoob here

Postby novatria » Sun Feb 10, 2013 4:12 am

hi all, iam new here for learn some php code

whats wrong with my index.php code
Code: Select all
<?php
$subtitle = "HOMEPAGE";
include('title.php');
?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Aaaaa</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/template.css" rel="stylesheet">
    <link href="css/bootstrap-responsive.css" rel="stylesheet">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
    <![endif]-->

    <!-- Fav and touch icons -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="ico/apple-touch-icon-114-precomposed.png">
      <link rel="apple-touch-icon-precomposed" sizes="72x72" href="ico/apple-touch-icon-72-precomposed.png">
                    <link rel="apple-touch-icon-precomposed" href="ico/apple-touch-icon-57-precomposed.png">
                                   <link rel="shortcut icon" href="ico/favicon.png">


  </head>

  <body>

    <div class="container">
         <div class="masthead">
        <h3 class="muted">RF-SADISTIS PVP MODE</h3>
        <div class="navbar">
          <div class="navbar-inner">
            <div class="container">
              <ul class="nav">
            <li <?php if ((isset($_GET['id'])) && ($_GET['id'] == home)) { echo "class='active'"; } ?>><a href="?=home">Home</a></li>
            <li <?php if ((isset($_GET['id'])) && ($_GET['id'] == download)) { echo "class='active'"; } ?>><a href="?=download">DOWNLOAD</a></li>
              </ul>
            </div>
          </div>
        </div><!-- /.navbar -->
      </div>


<?php
                  if (((isset($_GET['id'])) && ($_GET['id'] == home)) || (!isset($_GET['id']))) { include('jajal.php'); };
                                 if (((isset($_GET['id'])) && ($_GET['id'] == home)) || (!isset($_GET['id']))) { include('download.php'); };   
?>
      <div class="footer">
        <p>Sadsitis-Gaming&copy; Company 2013</p>
      </div>

    </div> <!-- /container -->

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap-transition.js"></script>
    <script src="js/bootstrap-alert.js"></script>
    <script src="js/bootstrap-modal.js"></script>
    <script src="js/bootstrap-dropdown.js"></script>
    <script src="js/bootstrap-scrollspy.js"></script>
    <script src="js/bootstrap-tab.js"></script>
    <script src="js/bootstrap-tooltip.js"></script>
    <script src="js/bootstrap-popover.js"></script>
    <script src="js/bootstrap-button.js"></script>
    <script src="js/bootstrap-collapse.js"></script>
    <script src="js/bootstrap-carousel.js"></script>
    <script src="js/bootstrap-typeahead.js"></script>

  </body>
</html>

if i hit the download button,
include from jajal.php always following in download.php

thx before,
novatria
New php-forum User
New php-forum User
 
Posts: 1
Joined: Sun Feb 10, 2013 4:07 am

Re: Need Help, phpnoob here

Postby seandisanti » Thu Feb 14, 2013 2:15 pm

the most obvious thing that jumps out at me is that you don't have 'home' quoted, so you should probably be getting unknown constant errors.
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 783
Joined: Mon Oct 01, 2012 12:32 pm

Re: Need Help, phpnoob here

Postby php9 » Fri Feb 22, 2013 2:27 am

seandisanti wrote:the most obvious thing that jumps out at me is that you don't have 'home' quoted, so you should probably be getting unknown constant errors.


That's true, there would be an unknown warning/notice but this won't produce a fatal error. PHP will fail to find the constant and then assume "home" is a string.
php9
New php-forum User
New php-forum User
 
Posts: 13
Joined: Fri Feb 22, 2013 2:20 am


Return to PHP General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.