Welcome Guest, Not a member yet? Register   Sign In
image gallery
#1

[eluser]eabihaydar[/eluser]
hey,

i need to know how we save uploaded pictures in database and display the pictures in gallery

Many thanks
#2

[eluser]umefarooq[/eluser]
hi no need to save the picture in database you only need to save the picture name in the database, while creating picture gallery in your image tag source give the path and name from database.
#3

[eluser]Colin Williams[/eluser]
Validate form > Process photo upload > Obtain file name of new photo > Use model to put entry in database, storing just the filename (no path, use config for path to photo folder)

Use model to retrieve database entries > Send result to a view > iterate results in view, putting config'd folder + image filename into an image tag




Theme © iAndrew 2016 - Forum software by © MyBB