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_174535must 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. 
 mysql_real_escape_string  
Comments
Post a Comment