hello sir
please help me
i have a feedback form in my website,where user fill up the form and submit,i want feedback on my email id from mywebsite.but feedback not sent on my email id,direct excute else condtion
this is my html form and code
------------------------------
<!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=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<table width="400" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td><strong>feed</strong></td>
</tr>
</table>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><form name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="16%">Subject</td>
<td width="2%">:</td>
<td width="82%"><input name="subject" type="text" id="subject" size="50"></td>
</tr>
<tr>
<td>Detail</td>
<td>:</td>
<td><textarea name="message" cols="50" rows="4" id="message"></textarea></td>
</tr>
<tr>
<td>Name</td>
<td>:</td>
<td><input name="name" type="text" id="name" size="50"></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><input name="user_mail" type="text" id="user_mail" size="50"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit">
<input type="reset" name="Submit2" value="Reset"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
<?php
if(isset($_POST['Submit']))
{
$to ="[email protected]";
$subject =$_POST['subject'];
$message =$_POST['message'];
$user_mail=$_POST['user_mail'];
$headers = "From: $user_mail";
$sent=mail($to,$subject,$message,$headers);
if($sent)
{
echo "Thanks";
}
else
{
echo "Not Sent";
}
}
?>
please help me
i have a feedback form in my website,where user fill up the form and submit,i want feedback on my email id from mywebsite.but feedback not sent on my email id,direct excute else condtion
this is my html form and code
------------------------------
<!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=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<table width="400" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td><strong>feed</strong></td>
</tr>
</table>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><form name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="16%">Subject</td>
<td width="2%">:</td>
<td width="82%"><input name="subject" type="text" id="subject" size="50"></td>
</tr>
<tr>
<td>Detail</td>
<td>:</td>
<td><textarea name="message" cols="50" rows="4" id="message"></textarea></td>
</tr>
<tr>
<td>Name</td>
<td>:</td>
<td><input name="name" type="text" id="name" size="50"></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><input name="user_mail" type="text" id="user_mail" size="50"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit">
<input type="reset" name="Submit2" value="Reset"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
<?php
if(isset($_POST['Submit']))
{
$to ="[email protected]";
$subject =$_POST['subject'];
$message =$_POST['message'];
$user_mail=$_POST['user_mail'];
$headers = "From: $user_mail";
$sent=mail($to,$subject,$message,$headers);
if($sent)
{
echo "Thanks";
}
else
{
echo "Not Sent";
}
}
?>
Comment