Need Help, phpnoob here

General discussions related to php

Moderators: macek, egami, gesf

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

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

$subtitle = "HOMEPAGE";

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <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>

    <!-- 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">



    <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>
        </div><!-- /.navbar -->

                  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> <!-- /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>


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

thx before,

php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

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.

New php-forum User
New php-forum User
Posts: 13
Joined: Fri Feb 22, 2013 2:20 am

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.

Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 4 guests