- This topic is empty.
-
AuthorPosts
-
June 22, 2013 at 8:13 am #45748
austinnnnn
ParticipantI need some help. I have my website, wich will have a backoffice to insert data, and a front end that will do some querys to databse.
I want to be able to upload images when i insert a new data. here is the form, here i want to upload images:
http://i.imgur.com/jKYjxl4.jpg
But i want the images to be stored in a folder, not in the database. Like images/$id
So when i enter a new data, it will create a folder with the id of the data i insert on the database, and upload the images to there. Other thing i want is to upload several images, so i upload one, and when that field already have a image, it will display another field so i can upload more.
Then when i display them, i want to display like a thumbnail for the first image i insert, and then when i click, the image will be displayed in real size, and i can click and nagivate to the others, like a galery. So i think the best is to resize the images to 800×600 and create a thumbnail to the 1st one i guess.
Can someone help me?
June 23, 2013 at 3:59 am #139937Paulie_D
MemberWhat have you tried so far.
You can’t just state a bunch of requirements and expect us to do all the work for you.
Are you using a CMS?
If not, have you though about using one?
June 23, 2013 at 5:00 am #139944Kitty Giraudel
Participant> But i want the images to be stored in a folder, not in the database. Like images/$id
This is common sense. You do not store images in a database, you store paths.
June 23, 2013 at 7:12 am #139956austinnnnn
ParticipantNo im not using CMS. This is for the final project of my course, i cant use cms, since if i use it, i just would have to install plugins and my work was done ..
June 23, 2013 at 7:16 am #139957Paulie_D
MemberThen I repeat…
>What have you tried so far>
>You can’t just state a bunch of requirements and expect us to do all the work for you.
June 24, 2013 at 5:03 pm #140140austinnnnn
Participantcan someone give me a good tutorial so i can start to make? like upload images to a folder. i cant find any good
June 24, 2013 at 5:13 pm #140143Kitty Giraudel
ParticipantJune 25, 2013 at 5:17 pm #140416austinnnnn
ParticipantSo i was working on this, and the images are uploaded, the many i select, they go for the folder. but only the path of one is stored on the bd. So what i want to do is like, everytime i insert a new place, that will contain several images, i want it to create a folder with the id of the place, and all the images will go into to the folder. so only the folder path will be stored in db, and when i list a place, i will get all the images of that place.
like:
images/place1 (but not place1, just the id of the place)
images/place2This is what i got for now:
June 25, 2013 at 5:35 pm #140392Kitty Giraudel
ParticipantI’m not sure this forum is the best way to display some PHP code. Why don’t you try http://codepad.org/ ?
June 26, 2013 at 9:29 am #140500austinnnnn
Participantnobody?
June 26, 2013 at 9:33 am #140501Kitty Giraudel
ParticipantIf no mistake `move_uploaded_file` creates path if it doesn’t exist. So if you want to move the file to a folder that doesn’t exist, the function will create it and drop the file in.
July 19, 2013 at 4:27 am #143666saeed55sd
Member$dir = ‘myDir’;
if ( !file_exists($dir) ) {
mkdir ($dir, 0777);
}July 19, 2013 at 7:17 am #143783chaudharisuresh01
Membernice discussion
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.