boilermaker73 Posted February 14, 2021 Share Posted February 14, 2021 I have a one-page responsive website template with a built-in contact email form whereby I would like to add an upload file attachment provision to the contact form. While I have been able to successfully add two fields (source, URL) to the built-in contact email form, with exception of adding the HTML to the form , modification to the contact email form's PHP files appears to be much more involved whereby I have been unable to find a barebones PHP code I can add to the existing PHP to make this work. I should also add that while I am well versed in HTML, CSS, and Javascript, I am not when it comes to PHP. In brief, I prefer not to replace the built-in contact form with different HTML and PHP for adding a contact form email file attachment. Any suggestions regarding this subject matter are appreciated. Since PHP is not listed under accepted file types for attachment to this post, I can provide download links to the contact email form PHP files from my iHost server for review if need be. The website address to view the HTML source code for the built-in contact form is https://www.seoauditspecialists.com. Apart from my having to add 'enctype=”multipart/form-data”' to the contact form's <form action> line of code, the HTML to add the 'file' field is provided below. Thank you ahead of time. <div class="form-group"> <input type="file" class="form-control" name="uploaded_file" id="uploaded_file" / </div> Quote Link to comment https://forums.phpfreaks.com/topic/312150-barebones-php-to-add-a-contact-email-form-upload-file-provision/ Share on other sites More sharing options...
requinix Posted February 14, 2021 Share Posted February 14, 2021 If you're having problems with a HTML form submitting to PHP code then we're going to have to see the HTML form and the PHP code. Quote Link to comment https://forums.phpfreaks.com/topic/312150-barebones-php-to-add-a-contact-email-form-upload-file-provision/#findComment-1584467 Share on other sites More sharing options...
Barand Posted February 14, 2021 Share Posted February 14, 2021 https://www.php.net/manual/en/features.file-upload.post-method.php Quote Link to comment https://forums.phpfreaks.com/topic/312150-barebones-php-to-add-a-contact-email-form-upload-file-provision/#findComment-1584470 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.