xxreenaxx1 Posted February 15, 2011 Share Posted February 15, 2011 I am getting an error message. But the program works Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\Exam_Online\try.php:3) in C:\xampp\htdocs\Exam_Online\Staff_login_process.php on line 4 Wrong Username or Password my code is <Html> <?php //session_start(); include 'Staff_login_process.php'; MYSQL_CONNECT(localhost,'root','') OR DIE("Unable to connect to database"); @mysql_select_db(Examination) or die( "Unable to select database"); ?> <body> <form action="try1.php" method="post"> <?PHP $query=("SELECT * FROM User u, User_X_Subject us, Subject s WHERE u.Use_Name = '{$_SESSION['username']}' AND u.Use_ID= us.Use_ID AND s.Sub_ID=us.Sub_ID"); $result=mysql_query($query) or die ("Unable to Make the Query:" . mysql_error() ); echo "<select name=myselect>"; while($row=mysql_fetch_array($result)){ echo "<OPTION VALUE=".$row['Sub_ID'].">".$row['Sub_Name']."</OPTION>"; } echo "</select>"; ?> <input type="submit" value="submit"/> </form> </body> </html> Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted February 15, 2011 Share Posted February 15, 2011 There's a sticky thread about this at the top of the forum - HEADER ERRORS - READ HERE BEFORE POSTING THEM Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.