Some links to files that have been upload do not come out properly. The very end of the link is not clickable or part of the link as it should be. Is there a fix for this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is only a fix if your know what the problem is.
PHPformgen attemtps to attach a date stamp to file names so that files of the same name don't get overwritten. These names then have to be converted to links when sent in the email or displayed in any followup pages.
My guess would be that one or more of the name conversions is failing.
If you can not figure it out come back and let me know. To do anything more I would have to see your form and process.php file.
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. It seems to happen when theres a space in the uploaded file name.
Links in email show but the end of the link isn't linked - e.g below the text up to the end of the word Skype shows highlighted as a link, "in a Bag.png" doesn't, so when you click the link it goes to http://mydomain.com/phpform/use/pic1/files/10_43_05_Skype instead of the full link
In your proces.php file you will find lines that look like this;
$PropertyAddressCity=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $PropertyAddressCity);
Take a look at the preg_replace function. In the above line the function replaces (\015\012) or (\015) or (\012) with " <br>". If you find an ascii to octal conversion chart you will see that the \015 is the carriage return character, and the \012 is the line feed character. The variable $PropertyAddressCity is evaluated and charcaters are replaced if necessary.
In your example you would want something like this;
$yourvariable=preg_replace("/(\040)/","%20", $yourvariable);
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Some links to files that have been upload do not come out properly. The very end of the link is not clickable or part of the link as it should be. Is there a fix for this?
There is only a fix if your know what the problem is.
PHPformgen attemtps to attach a date stamp to file names so that files of the same name don't get overwritten. These names then have to be converted to links when sent in the email or displayed in any followup pages.
My guess would be that one or more of the name conversions is failing.
If you can not figure it out come back and let me know. To do anything more I would have to see your form and process.php file.
I'm having the same problem. It seems to happen when theres a space in the uploaded file name.
Links in email show but the end of the link isn't linked - e.g below the text up to the end of the word Skype shows highlighted as a link, "in a Bag.png" doesn't, so when you click the link it goes to http://mydomain.com/phpform/use/pic1/files/10_43_05_Skype instead of the full link
Photo1: http://mydomain.com/phpform/use/pic1/files/10_43_05_Skype in a Bag.png
If I copy/paste the link from the email into browser
http://mydomain/phpform/use/pic1/files/11_35_38_Architect Skype.png
it changes to
http://mydomain/phpform/use/pic1/files/11_35_38_Architect%20Skype.png and the pic displays
so I guess what we need is to replace spaces in filenames with %20
Only problem is I don't know how.....................
In your proces.php file you will find lines that look like this;
$PropertyAddressCity=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $PropertyAddressCity);
Take a look at the preg_replace function. In the above line the function replaces (\015\012) or (\015) or (\012) with " <br>". If you find an ascii to octal conversion chart you will see that the \015 is the carriage return character, and the \012 is the line feed character. The variable $PropertyAddressCity is evaluated and charcaters are replaced if necessary.
In your example you would want something like this;
$yourvariable=preg_replace("/(\040)/","%20", $yourvariable);
explicitly replacing characters is not a good idea. use the urlencode() function
Had to use rawurlencode to get it working, with urlencode the space was replaced with a "+"
Photo1: ".$where_form_is."files/".rawurlencode($image_list[5])."
or that.