Forums

name file upload with field name

usnul 06 Oct, 2010
can anyone tell me how to add field name to file upload name's??
GreyHead 06 Oct, 2010
Hi usnul,

Try
$filename = JRequest::getWord('input_name', '', 'post').'_'.$chronofile['name'];
You need to make sure that the result from the input is going to be valid in a file name; and that you maintain the correct file suffix (.png, .doc, etc).

Bob

PS This is explained in more detail in Chapter 8 of The ChronoForms Book
This topic is locked and no more replies can be posted.