NEED URGENT HELP

Discussion in 'PHP' started by ashokdhan, Jun 16, 2015.

  1. #1
    Hello

    I need to send .doc and .pdf on mail using my php form.

    my code is here Form code
    <form action="contactform.php" class="form-horizontal" method="post" enctype="multipart/form-data">
    
      <input type="file" name="uploaded_file" maxlength="500" allow="text/*">
    <input type="hidden" value="thank" name="message" />
            <?php
            $url_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
            ?>
            <input type="hidden" value="<?php echo $url_link; ?> " name="url" />
               <button type="submit" class="btn btn-success" style="width:100%;">submit</button>
    PHP:
    PHP Code
    <?php
    
    $errors = '';
    $myemail = 'mymail.mymail.com';
    
    $uploaded_file = $_POST['uploaded_file'];
    
    {
        $to = $myemail;
        $email_subject = "my pdf file: $uploaded_file";
        $email_body = "You have received a new message. ".
    "Here are the details:\n file: $uploaded_file:"  ;
    $headers = "From: $e_mail\n";
        $headers .= "Reply-To: $e_mail";
    }
    
    ?>
    PHP:
    But i am not able get attached file on my mail
     
    ashokdhan, Jun 16, 2015 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    PoPSiCLe, Jun 16, 2015 IP
  3. ashokdhan

    ashokdhan Well-Known Member

    Messages:
    268
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    160
    Digital Goods:
    2
    Articles:
    1
    #3
    ashokdhan, Jun 16, 2015 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    deathshadow, Jun 17, 2015 IP
    freelanceDeveloper likes this.