Re: Session problems
From: Matthias Esken (muelleimer2003nospam_at_usenetverwaltung.org)
Date: 10/30/03
- Next message: Matthias Esken: "Re: Session problems"
- Previous message: RG: "Re: PHP Based Shopping cart"
- In reply to: Daniel Bengs: "Re: Session problems"
- Next in thread: Matthias Esken: "Re: Session problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Matthias Esken: "Re: Session problems"
- Previous message: RG: "Re: PHP Based Shopping cart"
- In reply to: Daniel Bengs: "Re: Session problems"
- Next in thread: Matthias Esken: "Re: Session problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|