Åê¹Æ¼Ô ¥á¥Ã¥»¡¼¥¸
<  PHP¥¨¥Ç¥£¥¿ ¼ÁÌ䡦Í×˾¡¦ÉÔ¶ñ¹çÊó¹ð  ~  ½õ¤±¤Æ¤¯¤À¤µ¤¤¡ª
criskeiichi
Åê¹Æ£±»þ´Ö: ÅÚ 2·î 13, 2010 12:14 am  °úÍÑ



ÅÐÏ¿Æü: 2010ǯ2·î 13Æü
Åê¹Æµ­»ö: 1

¤â¤¦¥À¥á¤Ç¤¹¡£
¤È¤Æ¤â¥«¥ó¥¿¥ó¤Ê¥Õ¥©¡¼¥à¤ß¤¿¤¤¤Ç¤¹¤¬¡¢
·ï̾¤À¤±¤Ï¤Á¤ã¤ó¤ÈÆüËܸì¤Ë¤Ê¤ê¤Þ¤»¤ó¡£

¥Õ¥¡¥¤¥ë¤Ï»°¤Ä¤Ç¤¹¡£


­¡¡¡mail1.html

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

<?php
session_start();

if(isset($_POST))
{
if(isset($_POST["add"]))
{
$_SESSION["name"] = $_POST["name"];
$_SESSION["email"] = $_POST["email"];
$_SESSION["place5"] = $_POST["place5"];
header("location: mail1_confirm.html");
}
if(isset($_POST["clear"]))
{
$_SESSION["name"] = "";
$_SESSION["email"] = "";
$_SESSION["place5"] = "";
}
}

?>




<!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" lang="ja" xml:lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
>
<title>¥Õ¥©¡¼¥à</title>

<!--]fontsize-->

</head>


<body>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td background="img/bg.gif">

<div style="padding:0px 30px 0px 40px">

<form name="form1" id="form1" method="post" action="mail1.html" onSubmit="return _validation();">
<p align="right" class="style4" style="margin-right:20px">&nbsp;</p>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="2" bgcolor="#175600">&nbsp;</td>
<td style="padding:15px 0px 15px 10px"><span class="style9">¥©¡¼¥à</span></td>
</tr>
</table>
<p class="style3">&nbsp;</p>
<table width="100%" border="0" cellspacing="10" cellpadding="0">
<tr>
<td><span class="style4">̾Á°¡§</span>
<input type="text" name="name" id="name" value="<?php echo $_SESSION["name"]; ?>" style="width:150px"/>
</td>
</tr>
<tr>
<td><span class="style4">¥á¡¼¥ë¡§</span>
<input type="text" name="email" id="email" value="<?php echo $_SESSION["email"]; ?>" style="width:150px"/>
</td>
</tr>

</table>
<br />
<br />
<table width="100%" border="0" cellspacing="10" cellpadding="0">

<tr>
<td><span class="style7">¥³¥á¥ó¥È</span></td>
</tr>
<tr>
<td><textarea name="place5" id="place5" style="width:470px"><?php echo $_SESSION["place5"]; ?></textarea></td>
</tr>
</table>
<p><input type="submit" name="add" id="add" value="³Îǧ" />
<input type="submit" name="clear" id="clear" value="¥ê¥»¥Ã¥È" />
</p>
</form>
</div>

<div align="center"></div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>


///////////////////////////////////////////////////////////////////

­¢¡¡mail1_confirm.html





<?php
session_start();
if($_SESSION["name"] == "")
header("location:mail1.html");

$to = "username@emailserver.com";

$subject = "¥Û¡¼¥à¥Ú¡¼¥¸¤«¤é¤Î¥á¥Ã¥»¡¼¥¸";
if(isset($_POST))
{
if(isset($_POST["confirm_add"]))
{
$from_email = $_SESSION["email"];
$from_name = $_SESSION["name"];

$body = "
¨®¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¯
¡¡¿Ç»¡´õ˾¥Õ¥©¡¼¥à
¨±¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨°

¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½
¡¡¢£Ì¾Á°
¡¡¡¡" .$_SESSION["name"]. "
¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½
¡¡¢£¥á¡¼¥ë
¡¡¡¡" .$_SESSION["email"]. "
¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½
¡¡¢£¥³¥á¥ó¥È
¡¡¡¡" .$_SESSION["place5"]. "
¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½


";

$_SESSION["name"] = "";
$_SESSION["email"] = "";
$_SESSION["place5"] = "";

if(_mail($to, $subject, $body, $from_email,$from_name))
header("location: mail1_result.html?res=1");
else
header("location: mail1_result.html?res=0");

}
if(isset($_POST["back"]))
{
header("location: mail1.html");
}
}

function _mail($to, $subject, $body, $from_email,$from_name)
{
mb_language("ja");
$subject = mb_convert_encoding($subject, "ISO-2022-JP","AUTO");
$subject = mb_encode_mimeheader($subject);

$from_name = mb_convert_encoding($from_name, "ISO-2022-JP","AUTO");
$from_name = mb_encode_mimeheader($from_name);

$headers = "MIME-Version: 1.0 \n" ;
$headers .= "From: " .
"".$from_name ."" .
"<".$from_email."> \n";
$headers .= "Reply-To: " .
"".$from_name ."" .
"<".$from_email."> \n";

$headers .= "Content-Type: text/plain;charset=ISO-2022-JP \n";
$body = mb_convert_encoding($body, "ISO-2022-JP","AUTO");
$sendmail_params = "-f$from_email";
$result = mail($to, $subject, $body, $headers, $sendmail_params);
return $result;
}

?>


<!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" lang="ja" xml:lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>¥Õ¥©¡¼¥à</title>


</head>


<body>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="img/top.gif" width="584" height="43" /></td>
</tr>
<tr>
<td background="img/bg.gif">

<div style="padding:0px 30px 0px 40px">

<form name="form1" id="form1" method="post" action="mail1_confirm.html">
<p align="right" class="style4" style="margin-right:20px">&nbsp;</p>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="2" bgcolor="#175600">&nbsp;</td>
<td style="padding:15px 0px 15px 10px"><span class="style9">¥Õ¥©¡¼¥à</span></td>
</tr>
</table>
<p class="style1">&nbsp;</p>
<table width="100%" border="0" cellspacing="10" cellpadding="0">
<tr>
<td class="style4"><span class="style2">*</span><span class="style4">̾Á°¡§</span>
<?php echo $_SESSION["name"]; ?>
</td>
</tr>

<tr>
<td class="style4"><span class="style4">¥á¡¼¥ë¡§</span>
<?php echo $_SESSION["email"]; ?></td>
</tr>
</table>
<br />
<br />
<table width="100%" border="0" cellspacing="10" cellpadding="0">

<tr>
<td><span class="style7">¥³¥á¥ó¥È</span></td>
</tr>
<tr>
<td class="style4"><?php echo $_SESSION["place5"]; ?></td>
</tr>
</table>
<p><input type="submit" name="confirm_add" id="add" value="Á÷¿®" />
<input type="submit" name="back" id="back" value="Ìá¤ë" />

</p>

</form>
</div>

<div align="center"></div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>



/////////////////////////////////////////////////////////////////////


­£ mail1_result.html



<?php
session_start();
if(isset($_POST))
{
if(isset($_POST["confirm_add"]))
{
header("location: mail1_result.html");
}
if(isset($_POST["back"]))
{
header("location: mail1.html");
}
}

?>


<!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>¥Õ¥©¡¼¥à</title>


</head>


<body>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="img/top.gif" width="584" height="43" /></td>
</tr>
<tr>
<td background="img/bg.gif">

<div style="padding:0px 30px 0px 40px">


<p align="right" class="style4" style="margin-right:20px">µÈ¼¿Â°ìÀèÀ¸¤Ø¤ÎÁêÃÌ¥Õ¥©¡¼¥à</p>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="2" bgcolor="#175600">&nbsp;</td>
<td style="padding:15px 0px 15px 10px"><span class="style9">¿Ç»¡´õ˾¥Õ¥©¡¼¥à</span></td>
</tr>
</table>
<p class="style1"><br />
</p>
<div align="left" class="style10" style="width:450px; margin-left:40px">
<?php
if(isset($_GET["res"]) && $_GET["res"])
echo "¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£";
else
{
echo "<p>¥á¡¼¥ëÁ÷¿®¥¨¥é¡¼</p>";
echo "<p>¥á¡¼¥ëÁ÷¿®¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£¤ª¼ê¿ô¤ò¤ª¤«¤±¤·¤Þ¤¹¡£¤â¤¦°ìÅٺǽ餫¤éÆþÎϤò¤ª´ê¤¤Ãפ·¤Þ¤¹¡£</p>";
}
?>
</div>
<p></p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="javascript:window.close();" class="style4">X ÊĤ¸¤ë </a></td>
</tr>
</table>
</div>
<div align="center"><img src="img/bottontxt.gif" width="513" height="35" /></div></td>
</tr>
<tr>
<td><img src="img/bott.gif" width="584" height="40" /></td>
</tr>
</table>
</body>
</html>


//////////////////////////////////////////////////////////


¤ª´ê¤¤¡¢Ê¬¤«¤ëÊý¤¬¤¤¤ì¤Ð¶µ¤¨¤Æ¤¯¤À¤µ¤¤¡£ :'(

ÌäÂê¤Ï·ï̾¤À¤±¤Ç¤¹¡£


µ¹¤·¤¯¤ª´ê¤¤¤·¤Þ¤¹¡£
¥È¥Ã¥×¤Ë°ÜÆ°
¥æ¡¼¥¶¡¼¾ðÊó¤òɽ¼¨ ¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®
¤æ¤»
Åê¹Æ£±»þ´Ö: ÅÚ 2·î 05, 2011 4:19 pm  °úÍÑ



ÅÐÏ¿Æü: 2007ǯ5·î 02Æü
Åê¹Æµ­»ö: 8

¤³¤ó¤Ë¤Á¤ï¡£

¤Ò¤µ¤Ó¤µ¤Ë¤³¤Á¤é¤Ë¤ä¤Ã¤Æ¤­¤Þ¤·¤¿¡£

¼«Ê¬¤â¥á¡¼¥ë¥Õ¥©¡¼¥à¤Ç¶ì¤·¤ó¤À¤Î¤Ç¡¢¤¦¤Þ¤¯²½¤±¤Æ¤¤¤Ê¤¤¥½¡¼¥¹¤òźÉÕ¤·¤Þ¤¹¡£

//ÆâÉô¥¨¥ó¥³¡¼¥É¤òÊѹ¹
mb_internal_encoding("ISO-2022-JP");

//ËÜʸ¤ò£Õ£Ô£Æ¡Ý£¸¤«¤é£É£Ó£Ï¤Ë¥Á¥§¥ó¥¸
$honbun = mb_convert_encoding($honbun,"ISO-2022-JP","UTF-8");

//·ï̾¤òBase64¤Ë¥Á¥§¥ó¥¸
$title=mb_encode_mimeheader($tmptitle,"ISO-2022-JP","B");

//mail´Ø¿ô¤Ë¤Æȯ¿®¡ª
mail($to, $title, $honbun,$yourheader);


»ä¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò£Õ£Ô£Æ¡Ý£¸¤ÇºîÀ®¤·¤¿¤Î¤Ç¡¢£Õ£Ô£Æ£¸¤«¤é¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Ë¤Ê¤ê¤Þ¤¹¤¬¡£

¤è¤«¤Ã¤¿¤é¤´»²¹Í¤Ë¡£
¡¦¡¦¡¦ÂÌÌܤÀ¤Ã¤¿¤é¤´¤á¤ó¤Ê¤µ¤¤¡£
¥È¥Ã¥×¤Ë°ÜÆ°
¥æ¡¼¥¶¡¼¾ðÊó¤òɽ¼¨ ¥á¥Ã¥»¡¼¥¸¤òÁ÷¿® ¥¦¥§¥Ö¥µ¥¤¥È¤Ë°ÜÆ°
ÆÃÄê´ü´ÖÆâ¤Îµ­»ö¤òɽ¼¨:   
All times are GMT +9:00

¼¡¤Î¥È¥Ô¥Ã¥¯¤òɽ¼¨
Á°¤Î¥È¥Ô¥Ã¥¯¤òɽ¼¨
Page 1 of 1
¥Õ¥©¡¼¥é¥à°ìÍ÷  ~  PHP¥¨¥Ç¥£¥¿ ¼ÁÌ䡦Í×˾¡¦ÉÔ¶ñ¹çÊó¹ð

¥È¥Ô¥Ã¥¯¤Î¿·µ¬Åê¹Æ   ÊÖ¿®


 
°ÜÆ°Àè:  

¿·µ¬Åê¹Æ: ÉÔ²Ä
ÊÖ¿®: ÉÔ²Ät
¼«Ê¬¤Îµ­»ö¤ÎÊÔ½¸: ÉÔ²Ä
¼«Ê¬¤Îµ­»ö¤Îºï½ü: ÉÔ²Ä
Åêɼ¤Ø¤Î»²²Ã: ÉÔ²Ä




Powered by phpBB
customized by phpspot.