Open Tyskacz opened 7 years ago
refresh
give the script? pls
if you can
crazy english)
@Tyskacz You can't upload images to mysql, however you can base64 encode those images and store them in a large data type.
@Jhair2015 trust me, you probably don't even want it...
@LegitSoulja "You can't upload images to mysql" what about data type called "BLOB" ?) But this approach is not good, much better just store images in directory and write to mysql path for that file
@F0RIS why even store data of image links? glob("skin/directory/*.png") returns an array of those images. You could then use ajax, to request that file in which will then list all the skins that exists in the directory.
Yes, write the path of that "image" after uploaded, or selected to the user skin him/her or it self..
And mybad for saying that you can't store images, you can get the content of the image but why? Why store images in mysql? Kindof pointless in my opinion.
@LegitSoulja we don't know what exactly want @Tyskacz implement. But I can agree with you, may be he don't need database at all)
@F0RIS people never think of efficient ways to do things. That however is not an efficient way of doing so.
@LegitSoulja thinking of efficient come with experience)
"Efficiency" - Yet, why not go look for another way?. Why use php and or MySQL when you barely don't know how to use it.
@LegitSoulja If I will try to answer it's gonna be a long conversation))
@F0RIS The answer is. Go and learn about something before doing so. Anyways, I'm done with this conversation. Have a nice day.
Okay, keep the link to the skin in MySQL but I want the script to someone who logs on is immediately loaded skin.
I use TranslateGoogle, my language is Polish
@Tyskacz Ok. Set it when they log in, the same way you'll save their username, and make sure you encrypt the user password. Using hash.
Adios.
FYI, hashing is not encrypting since "encrypt" implies it can be decrypted whereas hashes cannot be converted to the original text. Please don't encrypt the password; hash it.
@SimonOrJ You, Him. Gets the idea.
Thanks.
I made a simple login script. I would now like to allow the user to upload his skin and the uploaded image will be to MySQL. The next time you log in will automatically be set skin