the site that im using these scrips with enables a band to upload music mp3's of their band.
one issue im having is that if they have spaces in the song titles it breaks the links that display on the "thanks for signing up here's your info" page that process.php creates automatically.
it also creates various other problems in my system. i notice that it gives the files an ID number so that files of the same name can be uploaded and it doesnt cause issues..
well, is there any way to make it to where it searches for and deletes spaces automatically? for example
"Led Zeppelin You Shook Me.mp3" to
"LedZeppelinYouShookMe.mp3" ?
and on a similar note, when you delete a person's database their files stay in the folder. is there a way to make it to where when you delete the record it finds and deletes their appropriate uploaded file(s) ? it has the names IN the database, so it seems like it wouldnt be too difficult..
any help is appreciated :)
thx in advance
Mitch
lunavistaproductions.com
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your second question, the answer is still "yes, anything is possible". This requires a little extra effort but your going to have to let me know which Fromgenerator version you are using first. I think I know but just want to be sure I give t=you the right solution.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
this sounds like a good plan, i appreciate it... im still very new to php, so i'll have research a few different places to figure out how to make it work...
Having the same issues and tried to add some code from another post but cannot get it to work, I may be just adding it in the wrong place - not sure, using 2.0.9
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','YourName');
pt_register('POST','YourEmail');
$File1=preg_replace("/(\040)/","",$File1);
$File1=$HTTP_POST_FILES['File1'];
$File2=preg_replace("/(\040)/","",$File2);
$File2=$HTTP_POST_FILES['File2'];
$File3=preg_replace("/(\040)/","",$File3);
$File3=$HTTP_POST_FILES['File3'];
if($YourName=="" || $YourEmail=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
Any help - I simply want to remove an spaces from the file names.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The most obvious mistake is that you have the replace before the POST.
Try rearranging and restoring the original POST function like this;
pt_register('POST','File1');
pt_register('POST','File2');
pt_register('POST','File3');
$File1=preg_replace("/(\040)/","",$File1);
$File2=preg_replace("/(\040)/","",$File2);
$File3=preg_replace("/(\040)/","",$File3);
Then you have to be careful of th esyntax you use for preg_replace(). If you have the sytax right then these changes should work for you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looks like you may not have checked your syntax. If you print the modified string to the browser what do you get?
http://us2.php.net/preg-replace
This web site has all php code functions and examples for the function you are using. The previous link I supplied you has another function with examples on syntax that should work for you.
This is not rocket science. If you get the syntax right php code does work.
Post again if you still can not figure it out.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
don't use Fantastico, download the latest version from sourceforge and install it "your self". I have been in touch with Fantastico people regarding proper installation and it seems like they keep missing the point.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi !
the site that im using these scrips with enables a band to upload music mp3's of their band.
one issue im having is that if they have spaces in the song titles it breaks the links that display on the "thanks for signing up here's your info" page that process.php creates automatically.
it also creates various other problems in my system. i notice that it gives the files an ID number so that files of the same name can be uploaded and it doesnt cause issues..
well, is there any way to make it to where it searches for and deletes spaces automatically? for example
"Led Zeppelin You Shook Me.mp3" to
"LedZeppelinYouShookMe.mp3" ?
and on a similar note, when you delete a person's database their files stay in the folder. is there a way to make it to where when you delete the record it finds and deletes their appropriate uploaded file(s) ? it has the names IN the database, so it seems like it wouldnt be too difficult..
any help is appreciated :)
thx in advance
Mitch
lunavistaproductions.com
Anything is possible with a little effort.
The str_replace() function should do what you are looking for.
http://us2.php.net/manual/en/function.str-replace.php
Your second question, the answer is still "yes, anything is possible". This requires a little extra effort but your going to have to let me know which Fromgenerator version you are using first. I think I know but just want to be sure I give t=you the right solution.
this sounds like a good plan, i appreciate it... im still very new to php, so i'll have research a few different places to figure out how to make it work...
thanks! your answer is appreciated
as far as versions ..
"Homepage: http://phpformgen.sourceforge.net/
phpFormGenerator support forum
(We are not associated with the support forum)
New Installation (2.09c)
Disk space required: 0.5 MB
Disk space available: 140.5 MB
Current installations:
/database (2.09c)"
if that explains much "?" came with fantastico
Having the same issues and tried to add some code from another post but cannot get it to work, I may be just adding it in the wrong place - not sure, using 2.0.9
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','YourName');
pt_register('POST','YourEmail');
$File1=preg_replace("/(\040)/","",$File1);
$File1=$HTTP_POST_FILES['File1'];
$File2=preg_replace("/(\040)/","",$File2);
$File2=$HTTP_POST_FILES['File2'];
$File3=preg_replace("/(\040)/","",$File3);
$File3=$HTTP_POST_FILES['File3'];
if($YourName=="" || $YourEmail=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
Any help - I simply want to remove an spaces from the file names.
Thanks
The most obvious mistake is that you have the replace before the POST.
Try rearranging and restoring the original POST function like this;
pt_register('POST','File1');
pt_register('POST','File2');
pt_register('POST','File3');
$File1=preg_replace("/(\040)/","",$File1);
$File2=preg_replace("/(\040)/","",$File2);
$File3=preg_replace("/(\040)/","",$File3);
Then you have to be careful of th esyntax you use for preg_replace(). If you have the sytax right then these changes should work for you.
I never got this to work - is it possible someone can post what the correct code is fore 2.0.9 to remove spaces from file names - please.
Thanks
GReg
Looks like you may not have checked your syntax. If you print the modified string to the browser what do you get?
http://us2.php.net/preg-replace
This web site has all php code functions and examples for the function you are using. The previous link I supplied you has another function with examples on syntax that should work for you.
This is not rocket science. If you get the syntax right php code does work.
Post again if you still can not figure it out.
don't use Fantastico, download the latest version from sourceforge and install it "your self". I have been in touch with Fantastico people regarding proper installation and it seems like they keep missing the point.