php - Whats worng in this code? -


this question has answer here:

warning: cannot modify header information - headers sent (output started @ c:\xampp\htdocs\needs\home.php:2) in c:\xampp\htdocs\needs\session.php on line 6

session page:

    <?php //start session session_start(); //check whether session variable sess_member_id present or not if (!isset($_session['id']) || ($_session['id'] =='')) {     header("location: index.php");     exit(); } $session_id=$_session['id']; $user_query = $conn->query("select * members member_id = '$session_id'"); $user_row = $user_query->fetch(); $name = $user_row['firstname']." ".$user_row['middlename']." ".$user_row['lastname']; ?> 

it's caused whitespace before opening php tag.


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

c# - Breakout Brick Collision -