Hi,
My problem is that I use a third party script that allows me to upload extra pictures to my site.
The problem is that any pictures that are uploaded with any white spaces in their title end up with an empty file (red cross syndrom).
I have never really understood how the html/ php/ sql relationship works on picture uploads...
Where in the system do I strip the spaces form the users photo title.
This is a section of the embedded html php page...
#// Create a TMP directory for this session (if not already created)
if(!file_exists($image_upload_path.session_id()))
{
mkdir($image_upload_path.session_id(),0777);
}
#// Move uploaded file into TMP directory
move_uploaded_file($HTTP_POST_FILES[userfile][tmp_name],
$image_upload_path.session_id()."/".$HTTP_POST_FILES[userfile][name]);
#//Populate arrays
$EDIT_UPLOADED_PICTURES[] = $HTTP_POST_FILES[userfile][name];
$EDIT_UPLOADED_PICTURES_SIZE[] = $HTTP_POST_FILES[userfile][size];
session_name($SESSION_NAME);
session_register(EDIT_UPLOADED_PICTURES,EDIT_UPLOADED_PICTURES_SIZE);
Is this the section I should be looking at or am I off the mark..
Cheers in anticipation
John
My problem is that I use a third party script that allows me to upload extra pictures to my site.
The problem is that any pictures that are uploaded with any white spaces in their title end up with an empty file (red cross syndrom).
I have never really understood how the html/ php/ sql relationship works on picture uploads...
Where in the system do I strip the spaces form the users photo title.
This is a section of the embedded html php page...
#// Create a TMP directory for this session (if not already created)
if(!file_exists($image_upload_path.session_id()))
{
mkdir($image_upload_path.session_id(),0777);
}
#// Move uploaded file into TMP directory
move_uploaded_file($HTTP_POST_FILES[userfile][tmp_name],
$image_upload_path.session_id()."/".$HTTP_POST_FILES[userfile][name]);
#//Populate arrays
$EDIT_UPLOADED_PICTURES[] = $HTTP_POST_FILES[userfile][name];
$EDIT_UPLOADED_PICTURES_SIZE[] = $HTTP_POST_FILES[userfile][size];
session_name($SESSION_NAME);
session_register(EDIT_UPLOADED_PICTURES,EDIT_UPLOADED_PICTURES_SIZE);
Is this the section I should be looking at or am I off the mark..
Cheers in anticipation
John