This is the error i recieve when I use the log in system of my website. The session ID is correctly sent to the database and the form is processed.
Although, when it comes to redirecting to the logged in homepage this error appears. I have tested this exact script with no problems in my computers local host WAMP server.
When uploaded online and tested the error appears. Please help!:
Warning: Cannot modify header information - headers already sent by (output started at /home/gr/public_html/members_login_handle.php:6) in /home/gr/public_html/members_login_handle.php on line 97.
The coding for the members_login_handle.php which processes my members_login.php form to login is below:
[php]<?php
session_start();
?>
"; echo "
Please try again."; } else{ $check=mysql_query("SELECT * FROM users WHERE email = '".$id."' AND pwd = '".$pwd."'"); $row_num=mysql_num_rows($check); if($row_num < 1){ echo "The user name and/or password has been entered incorrectly."; echo "
"; echo "
"; echo "Please Try again."; }else{ $_SESSION['members'] = md5($_REQUEST['number']); $members = $_SESSION['members']; $_SESSION['id']=$id; $check = mysql_query("SELECT*FROM $table WHERE id= '".$id."' AND pwd = '".$pwd."'"); $row_num = mysql_num_rows($check); if($row_num < 1){ mysql_query("INSERT INTO $table (session,id,pwd) VALUES ('$members','$id','$pwd')"); header('location:"members_area.php?sess='.$URLsession.'"'); }else{ echo "You are not authorised to log in concurrent sessions"; echo "
"; echo "Try again"; } } } ?>[/php]
Thanks and can’t wait to hear back with responses. Been trying to fix it for days…
If any additional infomation is required I would be happy to provide it.
Louise