一行代码显示以及网页


A line of code is showing as well as the webpage

<?php
session_start();
include_once "incfiles/connectdb.php";
include_once "incfiles/func.php";
$page="gamepoints.php";
logincheck();
$username=$_SESSION['username'];
$fetch=mysql_fetch_object(mysql_query("SELECT * FROM accounts WHERE username='$username'"));
if ($_GET['item']){
$item=strip_tags($_GET['item']); 
if ($item == "LHP"){ $cost="50"; $amount="10000"; }
elseif ($item == "FMJ"){ $cost="70"; $amount="15000"; }
elseif ($item == "rankpoints"){ $cost="150"; $amount="10000"; }
elseif ($item == "awp"){ $cost="300"; $amount="1"; }
elseif ($item == "credits"){ $cost="50"; $amount="10"; }
elseif ($item == "money"){ $cost="300"; $amount="5000000"; }

从if if ($item == "LHP")到最后是我的网页上显示的页面,我似乎不明白为什么

不确定这是否是您的所有代码-如果是,看起来您可能错过了最后一个}

<?php
    session_start();
    include_once "incfiles/connectdb.php";
    include_once "incfiles/func.php";
    $page="gamepoints.php";
    logincheck();
    $username=$_SESSION['username'];
    $fetch=mysql_fetch_object(mysql_query("SELECT * FROM accounts WHERE username='$username'"));
    if ($_GET['item']){
        $item=strip_tags($_GET['item']); 
        if ($item == "LHP"){ $cost="50"; $amount="10000"; }
        elseif ($item == "FMJ"){ $cost="70"; $amount="15000"; }
        elseif ($item == "rankpoints"){ $cost="150"; $amount="10000"; }
        elseif ($item == "awp"){ $cost="300"; $amount="1"; }
        elseif ($item == "credits"){ $cost="50"; $amount="10"; }
        elseif ($item == "money"){ $cost="300"; $amount="5000000"; }
    }