Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8916431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:14:28+00:00 2026-06-15T05:14:28+00:00

I have a form. With the following: HTML: <form name=feedback_form method=post action= class=feedback_form> <input

  • 0

I have a form. With the following:

HTML:

<form name="feedback_form" method="post" action="" class="feedback_form">
    <input type="text" name="field-name" value="İsim" title="İsim" class="field-name form_field">
    <input type="text" name="field-email" value="Email" title="Email" class="field-email form_field">
    <input type="text" name="field-subject" value="Başlık" title="Başlık" class="field-subject form_field">
    <textarea name="field-message" cols="45" rows="5" title="Mesajınız..." class="field-message form_field">Mesajınız...</textarea>
    <label for='uploaded_file'>Fotoğrafınızı Yükleyin:</label>
    <input type="file" name="field-file" value="File">
    <br>
    <input type="reset" name="reset" id="reset2" value="Temizle" class="feedback_reset">
    <input type="button" name="submit" class="feedback_go" id="submit2" value="Gönder">                                    
</form>  

PHP:

<?php
header('Content-Type: text/html; charset=utf-8');

function sendFeedback($feedback_email, $feedback_msg, $feedback_name, $feedback_subject, $feedback_file) {


    /* EDIT THIS */
    $admin_email = "mymail@gmail.com";
    if ($feedback_subject == "Subject" || empty($feedback_subject) ) {
        $subj = "Email from your site";
    } else {
        $subj = $feedback_subject;
    }


    /* //EDIT THIS */


    $message = "
    <html>
    <head>
      <title>Websitenizin emaili</title>
    </head>
    <body>
        <p><a href='mailto:".$feedback_email."'>".$feedback_name."</a> send this message:</p>
        <p>".$feedback_msg."</p>
        <p>".$subject."</p>
    </body>
    </html>
    ";
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";

    if ($feedback_name!=="Name" && $feedback_email!=="Email" && !empty($feedback_email) && !empty($feedback_msg) && !empty($feedback_name) ) {
        if ($feedback_email == "mail_error") {
            echo "<span class='ajaxok'>Geçersiz email adresi.</span>";
        } else {            
            mail($admin_email, $subj, $message, $headers);
            echo "<span class='ajaxok'>Teşekkürler. Mesajınız gönderilmiştir.</span>";  
        }
    } else {
        echo "<span class='ajaxalert'>Lütfen zorunlu alanları doldurunuz.</span>";      
    }


}

sendFeedback($_POST['email'], $_POST['message'], $_POST['name'], $_POST['subject'], $_POST['file']);



?>

When send a message on this form, send email, working. But only subject, message, name and email. I want add image upload in this php code. But i don’t know how can i do it? Please help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:14:29+00:00Added an answer on June 15, 2026 at 5:14 am

    In the form you have to put enctype="multipart/form-data".
    In your php file you can access the file via $_FILES['file'];
    Then take a look at this tutorial

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have contact form structure. With the following: HTML: <form name=feedback_form method=post action= class=feedback_form>
I have a form. With the following: HTML: <form name=feedback_form method=post enctype=multipart/form-data action= class=feedback_form>
I have a form with the following HTML below: <form id=course_edit_form name=course_form action=/courses/save method=post>
I have the following HTML: <form id=test> <input type=radio value=A name=C1/> <a href=javascript:selectCheckbox('C1', 'A');>
I have following HTML table: <form method=post action=update-table.php> <table class=table-data style=width: 960px;> <thead> <tr>
I have the following html: <body> <form action=site1> <input type=image name=submit border=0 src=images/front/search_travel.png alt=
I have the following html: <html> <body> <form runat=server> Name: <input type=text name=name />
Suppose I have the following HTML: <form id=myform> <input type='checkbox' name='foo[]'/> Check 1<br/> <input
I have a html file like following: <form action=/2811457/follow?gsid=3_5bce9b871484d3af90c89f37 method=post> <div> <a href=/2811457/follow?page=2&amp;gsid=3_5bce9b871484d3af90c89f37>next_page</a> &nbsp;<input
I have following HTML form <form action=https://sandbox.paypal.com/cgi-bin/webscr method=post id=paypalpost name=paypalpost> <input type=hidden name=rm value=2/>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.