PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Mds
Forum Contributor
Posts: 110 Joined: Tue Apr 22, 2008 8:56 pm
Contact:
Post
by Mds » Sat Jul 05, 2008 5:33 pm
Hi friend.
I want to store an image to the MySql database's filed?
I don't know how I can do it
Can you help me ?
Last edited by
Mds on Sat Jul 05, 2008 5:39 pm, edited 1 time in total.
jaoudestudios
DevNet Resident
Posts: 1483 Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey
Post
by jaoudestudios » Sat Jul 05, 2008 5:36 pm
Convert it to a base64 string - be warned it will be big!
Why not just have an upload directory?
Mds
Forum Contributor
Posts: 110 Joined: Tue Apr 22, 2008 8:56 pm
Contact:
Post
by Mds » Sat Jul 05, 2008 5:41 pm
Why not just have an upload directory?
Is it better ?
Mds
Forum Contributor
Posts: 110 Joined: Tue Apr 22, 2008 8:56 pm
Contact:
Post
by Mds » Sat Jul 05, 2008 5:49 pm
Convert it to a base64 string
OK, Do you have any code for encoding an image to the string and decoding it ?
jaoudestudios
DevNet Resident
Posts: 1483 Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey
Post
by jaoudestudios » Sat Jul 05, 2008 6:32 pm
Its more the norm to use an upload directory.
I have the code for the conversion somewhere, I will try and dig it out tomorrow.
Mds
Forum Contributor
Posts: 110 Joined: Tue Apr 22, 2008 8:56 pm
Contact:
Post
by Mds » Sat Jul 05, 2008 7:07 pm
I have the code for the conversion somewhere, I will try and dig it out tomorrow.
Thank you.