ファイルのアップロードからそれを添付してメールを送るスケルトン


  mail_view.php



<!doctype html>
<html lang="ja">
<head>
<title>sendmail</title>
<meta charset="utf-8">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>

<script>

$(function(){
	$("#open_button").click(function () {
		$("#result").show();
	});
});
$(function(){
	$("#close_button").click(function () {
		$("#result").hide();
	});
});

</script>


<link type="text/css" rel="stylesheet" href="style.css">
<style>
body {
	margin: 20px;
}
textarea {
	width:600px;
	height:200px;
}
.input input {
	width:400px;
}

</style>
</head>

<!-- 画面表示部分 -->
<body>

<!-- フォーム開始 -->
<form method="post" action="mail_ex.php">
<div class="input">
宛先 <input type="text" name="to_address"><br>
件名 <input type="text" name="subj"><br>
</div>
<!-- テキストエリア -->
<textarea name="text"></textarea>
<br>
<!-- 送信ボタン -->
<input
	type="submit"
	name="send"
	value="送信"
	style='width:100px;'
>
</form>
<!-- フォーム終わり -->

<input
	type="button"
	id="close_button"
	value="閉じる"
	style='width:100px;'
>
<input
	type="button"
	id="open_button"
	value="開く"
	style='width:100px;'
>

<!-- アップロードするファイル名を JavaScript で表示 -->
アップロードしたファイル名 => 
<input
	type="text"
	id="mail_file"
	value="<?= $_SESSION["mail_file"] ?>"
	readonly
>


<br><br>
現在のセッション ID => <?= session_id() ?>
<br>
<!-- ファイルアップロード用の別ページ -->
<iframe
	src="form2.php"
	id="result"
	name="result"
	frameborder="1"
	scrolling="yes"
	style='width:600px;height:450px;display:none;'
></iframe>


<?php require_once("debug_value.php") ?>


</body>
</html>











  infoboard   管理者用   
このエントリーをはてなブックマークに追加





フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ