JHSPerc
New Member
So I thought if I did a submission php plug-in like this:
The file would be renamed the way I want it and it would be in the location I wanted. Well, alas it is not. What do I need to do in order to make this work?
PHP:
$lname = JRequest::getVar('freshsa___lname');
$fname = JRequest::getVar('freshsa___fname');
$minitial = JRequest::getVar('freshsa___minitial');
$essayupload = JRequest::getVar('freshsa___essayupload');
$old = ''.$essayupload.'';
$new = '../public_html/applications/'.$lname.'_'.$fname.'_'.$minitial.'';
rename($old, $new) or die ("Unable to rename $old to $new.");
$old1 = '../public_html/applications/'.$lname.'_'.$fname.'_'.$minitial.'';
$new1 = '../applications/essays/'.$lname.'_'.$fname.'_'.$minitial.'';
copy($old1, $new1) or die ("Unable to copy $old1 to $new1.");
The file would be renamed the way I want it and it would be in the location I wanted. Well, alas it is not. What do I need to do in order to make this work?