Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

90
Vistas
HTML Form not submitting any attached file

my form does not take or submit any attachment file and has the enctype and method attributes inside the form element. It looks like this:

<form action="vsend.php" class="volunteerAppForm" method="post" onsubmit="return validateForm()" role="form" enctype="multipart/form-data">

<div class="fileUploadSection">
    <label for="fileToUpload">Please upload your CV</label><br>
    <input type="file" name="file" id="fileToUpload" required>
  </div>
  <div class="captcha">
    <div class="g-recaptcha" data-sitekey="6Ld071QUAAAAAIutKo0CkibGU8oeaomD5niSfNiX"></div>
    <input type="submit" name='submit' value="send" class="submit-input" style="cursor: pointer;">
  </div>
</form>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I debugged my codes, the problem was in my strings just in my php file here:

//Attachments
    if (
        isset($_FILES['uploaded_file']) &&
        $_FILES['uploaded_file']['error'] == UPLOAD_ERR_OK
    ) {
        $mail->AddAttachment(
            $_FILES['uploaded_file']['tmp_name'],
            $_FILES['uploaded_file']['name']
        );
    }

As my input type attribute has a value "file", my string should also have the same name 'file' not 'uploaded_file' as showen above. Could be like so:

//Attachments

    if (
        isset($_FILES['file']) &&
        $_FILES['file']['error'] == UPLOAD_ERR_OK
    ) {
        $mail->AddAttachment(
            $_FILES['file']['tmp_name'],
            $_FILES['file']['name']
        );
    }
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda