This is my form and i need a script to allow user to send their cv to my email.

<form action="post-cv-action.php" method="post" enctype="multipart/form-data">
  <table width="100%" border="0" cellpadding="05" cellspacing="0" style="font-size:12px; font-family:Arial, Helvetica, sans-serif;">
      <tbody><tr>
      <td colspan="2" align="center"><h2 style="color:#333333; border-bottom:1px dashed #989898; padding-bottom:7px; margin-top:10px; padding-bottom:15px;">Submit your resume, we will find a right job for you.</h2> </td>
    </tr>

    <tr>
      <td colspan="2" align="center"><strong style="color:#FF0000; font-size:16px;"></strong></td>
     </tr>

    <tr>

      <td width="33%" align="right"><strong>Role :</strong> </td>
      <td width="67%"><label>
        <input name="cf_name" type="text" class="text-field" id="Name" size="30" placeholder="Ex. Web Designer">
      </label></td>
    </tr>
        <tr>
      <td align="right"><strong>Area :</strong> </td>
      <td><input name="Address" type="text" class="text-field" id="Address" size="30" placeholder="Ex. Delhi"></td>
    </tr>
    <tr>
      <td align="right"><strong>Email :</strong> </td>
      <td><input name="cf_email" type="text" id="Email" size="30" class="text-field" placeholder="Your valid email address"></td>
    </tr>
    <tr>
      <td align="right"><strong>Phone :</strong> </td>
      <td><input name="Mobile" type="text" class="text-field ['required','length[10,10]','digit'] text-input" id="Mobile" size="30" maxlength="10" placeholder="For interview calls"></td>
    </tr>
    <tr>
      <td align="right"><strong>Attech Resume :</strong> </td>
      <td><input name="attachment" type="file" id="thumbimg"></td>
    </tr>
    <tr>
      <td align="right">&nbsp;</td>
      <td>
        <label>
          <input type="submit" value="Post Now" id="upload" src="images/navi-bg.gif" class="blue-btn" style="padding:5px 10px; width:100px; color:#FFFFFF;">
          </label>
          </td>
    </tr>
  </tbody></table> 
 </form>

Hi,

I would hope that you have some PHP knowledge. If so, here is some very basic code to save your uploaded file to the server. You will need to substitute your own $dest value.

post-cv-action.php

<?php 

$filename = $_FILES['attachment']['name'];
$source = $_FILES['attachment']['tmp_name'];
$dest = $_SERVER['DOCUMENT_ROOT'].'/test/';
move_uploaded_file($source,$dest.$filename);

?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.