hi i want to send an email with attaching pdf file using php. i have the following script but the problem with this is when i send an attachment it does to the specified address but that email is empty means there is no attachment as well as message. what i am doing wrong in this script help
Code: <form id="requestcv" name="form1" method="post" action="request2.php"> <div> <label>Your Name:</label> <input type="text" name="name" id="textfield" /> </div> <div> <label>Your Email:</label> <input type="text" name="email" id="textfield2" /> </div> <div class="actions"> <input class="actions" type="submit" name="request" id="button" value="Request CV" /> </div> </form> <p> <?php if($_POST['request']) { //echo "My cv has been sent to your email address.Please check your email after 15 minutes. Thank you for requesting my CV."; $name = $_POST['name']; $email = $_POST['email']; $message = "Here is my CV you requested for.Please download attachment and view my cv.Thank you for using my services."; $to = $email; $subject = "This is from zafar portfolio"; $random_hash = md5(date('r', time()));