Re: Session problems

From: Matthias Esken (muelleimer2003nospam_at_usenetverwaltung.org)
Date: 10/30/03


Date: Thu, 30 Oct 2003 17:13:57 +0100

Daniel Bengs <a-very@non-existing-e-mail-adress.com> schrieb:

> And now I also noticed another funny thing. On one page where an
> addition to a mysql database is made a field, which is the user who made
> the addition, is empty for some persons, but not everyone who makes the
> addition. The username value is retrieved with:
>
> "((string) $_SESSION['username'])".
>
> But when the username, on the same page, is written to a logfile, with
> the same code above, it is not empty.

Does the problem occur while displaying the data or storing the data in
the database.

In the second case, there might be some special chars like ' in the
username. Always use mysql_escape_string() for values that you want to
send to the MySQL server.

Regards,
    Matthias



Relevant Pages

  • Re: validating security token when only username is specified
    ... password type is SendHashed and the Authenticator will be called. ... string should probably be allowed across the logic on both sides to at least ... > You will notice you can set a null or "" empty pw in UT constructor. ... >> but when i do not send password in username token. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: validating security token when only username is specified
    ... to wonder what the point of a empty password is to begin with. ... not sure the Trim() behavior is correct ... > i have overridden authenticatetoken method in username tokenmanager class ... > but when i do not send password in username token. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • RE: Run Advertised Programs is empty
    ... the SID, not the username, but any special characters in this username? ... Also I have found that when this troubling account logs in there are errors ... Is it a clew that Add New Programs also is empty? ... The other machine he logs in to is also in the collection. ...
    (microsoft.public.sms.misc)
  • Re: Session problems
    ... according to phpinfo() register globals is on. ... The username value is retrieved with: ... the same code above, it is not empty. ...
    (comp.lang.php)
  • Activation email upon user registration
    ... when users are register on our website, their username, encrpyted password and so on are stored in the mySQL database. ... Many phpbb sites though send an activation mail to the email address specified by the user. ...
    (alt.php)