i am creating a form as shown in image which saves detail in csv in background by putting php code in body block which works fine but can anyone tell me how to add the image upload option in form and to save the same in other place

i am creating a form as shown in image which saves detail in csv in background by putting php code in body block which works fine but can anyone tell me how to add the image upload option in form and to save the same in other place

First do not add code in body block. Create a custom module.
To add image field please refer Drupal Form API.
Eg.
$form['image_example_image_fid'] = array(
'#title' => t('Image'),
'#type' => 'managed_file',
'#description' => t('The uploaded image will be displayed on this page using the image style choosen below.'),
'#default_value' => variable_get('image_example_image_fid', ''),
'#upload_location' => 'public://image_example_images/',
);