pbuk
Science Advisor
Homework Helper
Gold Member
- 5,000
- 3,245
sbrothy said:That's what I think I'm doing.
Yes, it looks like it.
sbrothy said:I tried the PHP recommended way of just calling "session_start()" at the start of each page, but that didn't seem to work,
session_start must be called before any output is sent. It seems like you are unintentionally sending multiple byte order marks (and should not be sending any - they are invalid in XHTML and unnecessary in plain HTML) as well as comment tags before the DOCTYPE declaration.Do yourself a favour and switch to HTML 5.
sbrothy said:so now I'm handling the session manually.
Are you sure - I can still see that PHPSESSID cookie?
sbrothy said:I still need to encrypt stuff
What stuff do you need to encrypt?
sbrothy said:and use htmlspecialchars correctly.
Use a template engine like Twigg to avoid unescaped HTML.
sbrothy said:I'm probably open for an SQL injection attack.
Use PDO prepared statements (or a database abstraction library like ADODb) to avoid this.
sbrothy said:So if you have any more papers I'd love if you provide me with links.
No papers needed, this stuff is just PHP 101.