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

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -