Need help for my thesis. - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Need help for my thesis.

dr3idr3i Posts: 1Member
I have my thesis this semester and part of it is having a gallery for the organization. I have done uploading of picture on the same directory. My problem is how can i put the picture to the folder i have make.

-----------------------JAVASCRIPT CODE--------------------------



upload_url: "upfile.php,
file_post_name: 'uploadfile',
file_size_limit : "1024",
file_types : "*.jpg;*.png;*.gif",
file_types_description : "Image files",
file_upload_limit : 50,
flash_url : "js/swfupload/swfupload.swf",
button_image_url : 'js/swfupload/wdp_buttons_upload_114x29.png',
button_width : 114,
button_height : 29,
button_placeholder : $('#button')[0],
debug: false
.bind('fileQueued', function(event, file){
var listitem=''+
'File: '' ('+Math.round(file.size/1024)+' KB) '+


' '+
$('li#'' .cancel').bind('click', function(){
var swfu = $.swfupload.getInstance('#swfupload-control');
// start the upload since it's queued
.bind('fileQueueError', function(event, file, errorCode, message){
alert('Size of the file '' is greater than limit');
.bind('fileDialogComplete', function(event, numFilesSelected, numFilesQueued){
$('#queuestatus').text('Files Selected: '+numFilesSelected+' / Queued Files: '+numFilesQueued);
.bind('uploadStart', function(event, file){
$('#log li#''p.status').text('Uploading...');
$('#log li#''span.progressvalue').text('0%');
$('#log li#''span.cancel').hide();
.bind('uploadProgress', function(event, file, bytesLoaded){
//Show Progress
var percentage=Math.round((bytesLoaded/file.size)*100);
$('#log li#''div.progress').css('width', percentage+'%');
$('#log li#''span.progressvalue').text(percentage+'%');
.bind('uploadSuccess', function(event, file, serverData){
var item=$('#log li#';

item.find('div.progress').css('width', '100%');

var pathtofile='view »';
item.addClass('success').find('p.status').html('Done!!! | '+pathtofile);
.bind('uploadComplete', function(event, file){
// upload has completed, try the next one in the queue



//echo "album".$album;
mkdir('images/gallery/'.$album, 0777);

$uploaddir = './images/gallery/'.$album.'/';
$file = $uploaddir . basename($_FILES['uploadfile']['name']);
echo "error file size > 1 MB";
if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file)) {
echo "success";
} else {
echo "error ".$_FILES['uploadfile']['error']." --- ".$_FILES['uploadfile']['tmp_name']." %%% ".$file."($size)";

-----------------------HTML CODE--------------------------

Album Name:
Upload Date: "/>

    I hope you can help me. Thank you very much
    Sign In or Register to comment.