如何将我的电子邮件附件表单连接到 php。直接我的电子邮件。
html:-
<form id="form" class="blocks" enctype="multipart/form-data" action="js/upload_file.php" method="post">
<p>
<label>
Name:</label>
<input type="text" class="text" name="name" />
</p>
<p>
<label>
Address:</label>
<input type="text" class="text" name="address" />
</p>
<p>
<label>
Phone:</label>
<input type="text" class="text" name="phone" />
</p>
<p class="area">
<label>
Year Exp:</label>
<input type="text" class="text" name="exp" />
</p>
<p class="area">
<label for="file">
Upload ur CV:</label>
<input type="file" name="attachment">
</p>
<p>
<label>
</label>
<input type="submit" class="btn" value="Submit" />
</p>
</form>
<div class="right">
<img src="images/Careers.png" width="350" height="334">
</div>
</div>
</div>
</div>
如何将我的电子邮件附件表单连接到 php。直接我的电子邮件。如何将我的电子邮件附件表单连接到 php。直接我的电子邮件。如何将我的电子邮件附件表单连接到 php。直接我的电子邮件。
PHP :-
<?php
if (isset($_REQUEST['email']))
{
$domain='www.example.com';
$from='www.example.com';
$name = $_REQUEST['name1'] ;
$add = $_REQUEST['add'] ;
$phone = $_REQUEST['phone'] ;
$exp = $_REQUEST['exp'] ;
$attachment = $_REQUEST['attachment'] ;
$subject = 'Massage recieved from Pearl : '.$domain.'';
$body = $email.'
The person that contacted you is : '.$name.'
|------------------Full Details--------------------|
Name: '.$name.'
Address: '.$add.'
Phone: '.$phone.'
Experience: '.$exp.'
Attachment: '.$attachment.'
|--------------------End---------------------------|';
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('Thank you for your feedback. We will contact you shortly')
window.location.href='http://www.pearlgroup.asia';
</SCRIPT>");
mail("info@example.com",$from, $subject, $body);
// Check, if message sent to your email
// display message "We've recived your information"
}
else
{
echo "Try again";
}
?>`