Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stripping white spaces on uploaded pic titles

Status
Not open for further replies.

wudz

Programmer
Mar 28, 2001
135
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top