<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>html validation | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/html-validation/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sat, 10 Dec 2022 05:31:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>How to send enquiry or feedback mail using PHP script</title>
		<link>https://studentprojects.in/software-development/php-mysql/php-tutorial/send-enquiry-feedback-mail-php-script/</link>
					<comments>https://studentprojects.in/software-development/php-mysql/php-tutorial/send-enquiry-feedback-mail-php-script/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Wed, 31 Aug 2011 16:45:33 +0000</pubDate>
				<category><![CDATA[PHP Tutorial]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[enquiry script]]></category>
		<category><![CDATA[html validation]]></category>
		<category><![CDATA[mail script]]></category>
		<category><![CDATA[JavaScript validation]]></category>
		<category><![CDATA[php feedback code]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1765</guid>

					<description><![CDATA[<p>The PHP mail() function is used to send emails from inside a script. Syntax: mail(to,subject,message,headers,parameters) Here is an example of PHP feedback-form which you can directly publish on your website. The example below sends a message to a specified e-mail address. This PHP form includes Name, Email ID, Phone No, Subject, Message. Here JavaScript validation</p>
<p>The post <a href="https://studentprojects.in/software-development/php-mysql/php-tutorial/send-enquiry-feedback-mail-php-script/">How to send enquiry or feedback mail using PHP script</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>The PHP mail() function is used to send emails from inside a script.</p>
<p><strong>Syntax:</strong><br />
mail(to,subject,message,headers,parameters)</p>
<p>Here is an example of PHP feedback-form which you can directly publish on your website. The example below sends a message to a specified e-mail address. This PHP form includes Name, Email ID, Phone No, Subject, Message. Here JavaScript validation is used for Name and email id. </p>
<p><strong>HTML form:</strong></p>
<figure id="attachment_1766" aria-describedby="caption-attachment-1766" style="width: 397px" class="wp-caption aligncenter"><img decoding="async" class="size-full wp-image-1766" title="Enquiry mail template with validation" src="https://studentprojects.in/wp-content/uploads/2011/08/Sendmail.png" alt="Enquiry mail template with validation" width="397" height="241" /><figcaption id="caption-attachment-1766" class="wp-caption-text">Enquiry mail template with validation</figcaption></figure>
<p><strong>HTML form code:</strong></p>
<p>This html code also includes JavaScript validation. Save this code as feedback.html</p>
<pre lang="html" escaped="true" line="1">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Send enquiry - Electrofriends.com</title>
<script language="javascript">
function checkField(f1, tbl1, tbl2)
{
	if((f1.name.value=="") )
	{
	  document.getElementById(tbl1).style.display = '';
          return false;
	 }
	else if((f1.email.value=="") )
        {
	  document.getElementById(tbl2).style.display = '';
           return false;
        }		
	else return true;
}
</script>
</head>

<body>
<form name="f1" method="post" action="sendemail.php">
<table width="522" border="0" align="center" cellpadding="0" cellspacing="0" style="font-family:Arial, Helvetica, sans-serif; font-size:10pt;">
  <tr>
    <td width="16" height="25">&nbsp;</td>
    <td width="96">Name *</td>
    <td width="10" height="25"><strong>:</strong></td>
    <td width="163" height="25"><input name="name" type="text" id="name" /></td>
    <td width="237" height="25">
   
    <table width="233" border="0" cellspacing="0" cellpadding="0" id="tbl1" style="display:none; color:#FF0000">
  <tr>
    <td>Enter the Name</td>
  </tr>
</table>

    
    </td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td height="25">Email Id *</td>
    <td height="25"><strong>:</strong></td>
    <td height="25"><input name="email" type="text" id="email" /></td>
    <td height="25">
    
    <table width="233" border="0" cellspacing="0" cellpadding="0" id="tbl2" style="display:none; color:#FF0000">
  <tr>
    <td>Enter the Email Id</td>
  </tr>
</table>
    
    </td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td height="25">Phone No</td>
    <td height="25"><strong>:</strong></td>
    <td height="25"><input name="phone" type="text" id="phone" /></td>
    <td height="25">&nbsp;</td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td height="25">Subject</td>
    <td height="25"><strong>:</strong></td>
    <td height="25"><input name="sub" type="text" id="sub" /></td>
    <td height="25">&nbsp;</td>
  </tr>
  <tr>
    <td height="95">&nbsp;</td>
    <td height="95">Message</td>
    <td height="95"><strong>:</strong></td>
    <td height="95" colspan="2"><textarea name="message" cols="30" rows="5" id="message">&nbsp;</textarea></td>
  </tr>
  <tr>
    <td height="25" colspan="2">&nbsp;</td>
    <td height="25">&nbsp;</td>
    <td height="25" colspan="2"><input name="" type="submit" value="Submit" onclick="return checkField(f1,'tbl1','tbl2');" /> &nbsp;
    <input name="input4" type="reset" value="Reset" /></td>
  </tr>
</table>
</form>
</body>
</html>
</pre>
<p><strong>PHP code:</strong></p>
<p>Save below code as sendemail.php and update your email id.</p>
<pre lang="php" escaped="true" line="1">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Send Mail | studentprojects.in</title>
</head>

<body>
<?php  
    
    $name = $_REQUEST["name"];
    $email= $_REQUEST["email"];
    $phone = $_REQUEST["phone"];
    $sub= $_REQUEST["sub"];
    $message = $_REQUEST["message"];

    $todayis = date("l, F j, Y, g:i a") ; 
    $subject = "Enquiry From Website " ;
    $to= "xyz@yourdomain.com";

$msg.= "<table width='500' border='0' align='center' cellpadding='0' cellspacing='0' style='font-family:Arial, Helvetica, sans-serif; font-size:10pt; border:1px solid #ccc;'> ";
$msg.= "<tr>";
$msg.= "<td width='16' height='25'>&nbsp;</td>";
$msg.= "<td width='96'>Name</td>";
$msg.= "<td width='10' height='25'><strong>:</strong></td>";
$msg.= "<td height='25'>$name</td>";
$msg.= "</tr>";
$msg.= "<tr>";
$msg.= "<td height='25' bgcolor='#F5F5F5'>&nbsp;</td>";
$msg.= "<td height='25' bgcolor='#F5F5F5'>Email Id </td>";
$msg.= "<td height='25' bgcolor='#F5F5F5'><strong>:</strong></td>";
$msg.= "<td height='25' bgcolor='#F5F5F5'>$email</td>";
$msg.= "</tr>";
$msg.= "<tr>";
$msg.= "<td height='25'>&nbsp;</td>";
$msg.= "<td height='25'>Phone No</td>";
$msg.= "<td height='25'><strong>:</strong></td>";
$msg.= "<td height='25'>$phone</td>";
$msg.= "</tr>";
$msg.= "<tr>";
$msg.= "<td height='25' bgcolor='#F5F5F5'>&nbsp;</td>";
$msg.= "<td height='25' bgcolor='#F5F5F5'>Subject</td>";
$msg.= "<td height='25' bgcolor='#F5F5F5'><strong>:</strong></td>";
$msg.= "<td height='25' bgcolor='#F5F5F5'>$sub</td>";
$msg.= "</tr>";
$msg.= "<tr>";
$msg.= "<td height='95'>&nbsp;</td>";
$msg.= "<td height='95'>Message</td>";
$msg.= "<td height='95'><strong>:</strong></td>";
$msg.= "<td height='95'>$message</td>";
$msg.= "</tr>";
$msg.= "</table>";
               
$headers = "From: $name < $email >."; 
$headers .= "\r\nContent-Type: text/html; charset=ISO-8859-1\r\n"; 

mail($to, $subject, $msg, $headers) ;
	 
echo "<center><div align='center'>";
echo "<h1 style='font-family:arial, verdana; font-size:15pt;'>Your enquiry has been sent successfully!</h1>";
echo "  <br /> ";
?>
</body>
</html>

</pre>
<p><a href="https://studentprojects.in/wp-content/uploads/2011/08/Enquiry_form.zip">Download the equiry form here. </a></p><p>The post <a href="https://studentprojects.in/software-development/php-mysql/php-tutorial/send-enquiry-feedback-mail-php-script/">How to send enquiry or feedback mail using PHP script</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/php-mysql/php-tutorial/send-enquiry-feedback-mail-php-script/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
	</channel>
</rss>
