Session_Start related issues

Source: Internet
Author: User
Session_Start problems
Session_Start ();
echo fuck;
if ($_post[' Submit ']== ' Register ') {
Header (' Location:sign_in.php ');
}
$db =mysql_connect (' localhost ', ' bp6am ', ' 123 ') or Die (' Unable to connect. ');
mysql_select_db (' web ', $db) or Die (Mysql_error ($db));
if (!isset ($_session[' logged ')) | | $_session[' logged ']!=1) {
$query = ' Select user_name from user where user_name= ' '. $_post[' username '. ' " and password= "'. $_post[' password '). '";
$result =mysql_query ($query, $db) or Die (Mysql_error ($db));
if (mysql_num_rows ($result) ==1) {
echo fuck;
$_session[' username ']= $user _name;
$_session[' logged ']=1;
echo fuck;
Header (' Refresh:5; Location:index.php ');
}
else{
$_session[' username ']= ';
$_session[' logged ']=0;
Echo entered in a wrong the user name or password, please check. If you want to register, click here.;
}
}
?>
I set the Session_Start () at the beginning;
There is no output before this, but I am prompted with HTTP error (Internal Server error): An unexpected condition is encountered while the Server is Attem Pting to fulfill the request. If the session_start is correct, fuck should be able to be called out.
Ask for advice.
Another: This is my own writing login module, do not know if there is no security concerns?
Thank you

------Solution--------------------
Open PHP Error display function, you will see this line out of fatal error
Echo entered in a wrong the user name or password, please check. If you want to register, click here.;


Code Geek Recommended solutions:The server encountered an internal error (), prevented it from fulfilling this request.,http://www.daimami.com/java-we B/317.html
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.