-3
<html>
<body>
<?php
print "<form name='frmone' action='s1show.php' method='post' enctype='multipart/form-data'>";
print "Enter Your Name : <input type='text' name='name' /> </br>";
print "Enter Your Qualification : <input type='text' name='qln' /> </br> ";
print "Enter Your Place Living: <input type='text' name='place' /> </br> ";
print "Enter Your Country Name : <input type='text' name='country' /> </br>";
print "<input type='submit' value='SUBMIT' onclick='javascript : return validatedetails();'>";
print "</form>";
?>
</body>
</html>
<script language=javascript>
function validatedetails()
{
if(document.frmone.name.value=="")
{
alert("Please Enter Your Name");
frmone.name.focus();
return false;
}
if(document.frmone.qln.value=="")
{
alert("Please Enter Your Qualification");
frmone.qln.focus();
return false;
}
if(document.frmone.place.value=="")
{
alert("Please Enter Your Place Name");
frmone.place.focus();
return false;
}
if(document.frmone.country.value=="")
{
alert("Please Enter Your Country Name");
frmone.country.focus();
return false;
}
frmone.submit();
return true;
}
</script>
過程擊中形式低於.....
<html>
<body>
<?php
$to="[email protected]";
$subject="Hello, sir/madam :";
$from="[email protected]";
$body ="The personal details are show below : \n\n";
$body .= "Name :" . $_REQUEST['name'] . "\n\n" ;
$body .= "Qualification :" . $_REQUEST['qln'] . "\n\n" ;
$body .= "Place Name :" . $_REQUEST['place'] . "\n\n" ;
$body .="Country Name :" . $_REQUEST['country'];
if(mail($to,$subject,$body,$from))
{
echo "Thank You, Your Details has been sent to your mail";
}
else
{
echo "Email has not been sent..";
}
?>
</body>
</html>
**
您提供了代碼...您在這裏遇到了什麼問題? – 2011-02-01 11:40:20
我是第二個Sarwar Erfan,你想做什麼? – 2011-02-01 11:42:37