/    Sign up×
Community /Pin to ProfileBookmark

Creating a new photo album without going to another page

Normally, in a cms uploading new images will be a two-step process. First you have to create an album then go to a page where we will upload images into that album ([url]http://www.site.com/adminfolder/upload.php?album=Id[/url]) etc.

I would like to know if i can stay on the same page, click a link to make a new album, open a new div, and start uploading images right there.

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@hastxApr 16.2011 — Typically this involves ajax...the javascript makes the call to another script for processing, giving you a progress image while waiting, then loads the results within the div. You could do it with PHP only using an iframe, which would give the appearance of staying on the same page...but the ajax method is a lot better user experience.

Using the iframe method your links would target that frame, thus keeping you on the same parent page.
Copy linkTweet thisAlerts:
@igotosleepat2authorApr 16.2011 — Got it.

Any good tutorials you know for the ajax method?
Copy linkTweet thisAlerts:
@igotosleepat2authorApr 17.2011 — I used this code to upload my files, at http://webdeveloperplus.com/jquery/ajax-multiple-file-upload-form-using-jquery/

Now, after the file has been uploaded, exactly where and how do i put the mysql query to insert its name in the database?

And also, after the file's been upload, it displays the image next to the button. I would need then to have an input field below it for a caption that will also be saved in the database along the filename.
×

Success!

Help @igotosleepat2 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...