I have not been able to find any comments on this. I want to allow a user to upload a file but I want to save it as a certain name based on the answers they put in the form.
For example a user uploads a photo of themselves, named me.jpg, I want it to be save to disk as FirstNameLastName.jpg.
How would I accomplish this?
Thanks in advance!!!
Paul.
For example a user uploads a photo of themselves, named me.jpg, I want it to be save to disk as FirstNameLastName.jpg.
How would I accomplish this?
Thanks in advance!!!
Paul.
Hi Paul,
this will need to hack chronocontact.php, find thisl ine :
change it to whatever you like.
Cheers
Max
this will need to hack chronocontact.php, find thisl ine :
$filename = date('YmdHis').'_'.preg_replace('`[^a-z0-9-_.]`i','',$_FILES[$allowed_s2[0]]['name']);
change it to whatever you like.
Cheers
Max
One more question just came to mind. Is there a way to save the Joomla username, Joomla email address into the table as well, or get it into a hidden form field?
Hi Parisi,
use this code :
Email must be get from the _users table using the record id with $my->id
Cheers
Max
use this code :
global $my;
echo $my->username;
Email must be get from the _users table using the record id with $my->id
Cheers
Max
This topic is locked and no more replies can be posted.