HTML doesn't load after PHP opening tag -
right i'm coding simple user page getting 1 problem that's bugging me , can't find out why it's happening.
when ever put <?php html stop loading there.
<?php session_start(); if (!isset($_session["user"])) { $logged_in = "no"; } else { $username = $_session["user"]; $logged_in = "yes"; } include ('global.php'); ?>
<head> <title><?php echo $sitename; ?></title> <link rel="stylesheet" type="text/css" href="css.css"> <link href="https://fonts.googleapis.com/css?family=raleway" rel="stylesheet"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <div class="header"> <div class="header_content"> <div class="middle_logo"> <p><a href="index.php"><?php echo $sitename; ?></a></p> </div> </div> </div> <div class="under_header"> <?php $id = htmlentites($_get["id"]); $get_user_data = mysqli_query ($dconnect, "select * user_data id='$id'"); if (mysqli_num_rows($get_user_data) < 2) { header ("location: index.php"); } else { while ($row = mysqli_fetch_array($get_user_data)) { echo $row["username"]; } } ?> <h1><?php echo $users_name; ?></h1> </div> when @ source code ends @ <div class="under_header">
the answer has been found in comment :
the line :
$id = htmlentites($_get["id"]); contain error , should :
$id = htmlentities($_get["id"]); thanks @riggsfolly , @justonundermillions. can accept answer , close question.
Comments
Post a Comment