Page 1 of 1

MySql and Images

Posted: Sat Jan 24, 2004 7:27 pm
by sathenzar
Hey everyone, while I was creating my forum board I came across a problem, how do you store images in a database table? Like under a table I've made called usrs I would like an image field. How would you do this?
And one mroe question....so I don't have to login every time I want to make a post how can i just log in once? I was going to use cookies but I was told that they are to easy to break into and arn't good to hold people out. And I would to it by using the "somepage.php?usraccount=whoever&pass=mypassword" but then anyone can just look at their history. So anyone have any ideas? Thanks.

Posted: Sat Jan 24, 2004 7:42 pm
by Straterra
Use md5 encryption if you are going to store people's passwords into a cookie.What I would do, is store both the persons username and password (MD5 Encrypted), and then some key phrase in between, that way you could kind of know if people tampered with it if the key phrase was in the middle or not.

Posted: Sun Jan 25, 2004 9:33 pm
by fractalvibes
If you are wanting to store images in a table, store them as a BLOB.
Be sure and store the MIME type also so that you can handle multiple formats - gif,jpeg,png,etc.

fv

Posted: Sun Jan 25, 2004 9:38 pm
by microthick
This is the tutorial I learn from to store images in a db.

http://www.phpbuilder.com/columns/florian19991014.php3

Wow, didn't expect that many...cool

Posted: Mon Jan 26, 2004 12:33 am
by sathenzar
Hey, thanks I wans't ecpecting any replies yet. Kool, and thanks for the links, I'm looking at them now. And to Straterra, I agree with the motto completly :D