ok so pretty standard form, if got an the persons name in a field, and then down the bottom got an upload file field. first things first i would like to be able to rename the file uploaded to the name supplied earlier, and also most likely it will have spaces in the name. this is causeing a problem currently where the link to the file in the email that is sent wont work because of the spaces. now the person who gets these emails isnt the most techy so i need a way that when the file is renamed its also uploaded so there are no spaces.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having the same problem....this some of the code in process.php:
--------------------------------------------------------------------------
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['HeadPhoto']['name'];
$image_list[23] = $image_part;
copy($HTTP_POST_FILES['HeadPhoto']['tmp_name'], "files/".$image_part);
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['StopPhoto']['name'];
$image_list[24] = $image_part;
copy($HTTP_POST_FILES['StopPhoto']['tmp_name'], "files/".$image_part);
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
76: Head Photo: ".$where_form_is."files/".$image_list[23]."
77: Stop Photo: ".$where_form_is."files/".$image_list[24]."
--------------------------------------------------------------------------------
I need the photo to upload with it's orginal name without the server time stamp. Any clues? on what to add/remove???
Thanks,
beanwl
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is not practivcal to omit the time stamp. The time stamp distinguishes different users as well as the same user attempting to upload a document of the same name. If you wish to allow this possibility then you can remove the timestamp feature at your own risk.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ok so pretty standard form, if got an the persons name in a field, and then down the bottom got an upload file field. first things first i would like to be able to rename the file uploaded to the name supplied earlier, and also most likely it will have spaces in the name. this is causeing a problem currently where the link to the file in the email that is sent wont work because of the spaces. now the person who gets these emails isnt the most techy so i need a way that when the file is renamed its also uploaded so there are no spaces.
I'm having the same problem....this some of the code in process.php:
--------------------------------------------------------------------------
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['HeadPhoto']['name'];
$image_list[23] = $image_part;
copy($HTTP_POST_FILES['HeadPhoto']['tmp_name'], "files/".$image_part);
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['StopPhoto']['name'];
$image_list[24] = $image_part;
copy($HTTP_POST_FILES['StopPhoto']['tmp_name'], "files/".$image_part);
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
76: Head Photo: ".$where_form_is."files/".$image_list[23]."
77: Stop Photo: ".$where_form_is."files/".$image_list[24]."
--------------------------------------------------------------------------------
I need the photo to upload with it's orginal name without the server time stamp. Any clues? on what to add/remove???
Thanks,
beanwl
It is not practivcal to omit the time stamp. The time stamp distinguishes different users as well as the same user attempting to upload a document of the same name. If you wish to allow this possibility then you can remove the timestamp feature at your own risk.