PHP Session Variables - At Wit's End -


I'm just getting in MySQL and PHP - and I'm just trying to create a simple login system I am connected to log in logic and made, just fine, but now I can not get the session variable to move to new pages for my life. Can anyone show me the right way to do this?

This is my login script - which is active by submitting a form:

   

And here is the page that redirects it:

   & Lt; Title & gt; Untitled document & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; By & lt;? $ _SESSION ['status'] echo; ? & Gt; & Lt; / Body & gt; & Lt; / Html & gt;  

In this case, I am still trying to get the session variable to register, so I am trying to print the variable data. I am trying to use isset and it has been redirected to the re-login page. Redirect works, but this happens every time since the registration of the session variable.

PHP Verion 5.2.12

At a quick glance, three things:

  • You can not remember the session_start () script first.

  • If the account is present in the table two or more times, you can get the "wrong user name", which can sometimes occur during the trial.

  • You die () after redirecting

  • austinhabich_IC_20090511_174535 must be quoted.

  • session_start (); must be called in the head of the script before any HTML output.

  • Your SQL statement is weak for SQL injection.

Before using it in a query, the incoming data will be immediately mysql_real_escape_string

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -