폼메일 발송후에 확인창으로 안넘어가고 바로 메인으로 가는방법 좀 알려주세요 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

폼메일 발송후에 확인창으로 안넘어가고 바로 메인으로 가는방법 좀 알려주세요 정보

폼메일 발송후에 확인창으로 안넘어가고 바로 메인으로 가는방법 좀 알려주세요

본문

아래 소스 입니다
메일을 보내고 나면 " 돌아가기"  버튼이 새창에 뜨면서 클릭을 해줘야 이전 페이지로 넘 갑니다.
돌아가기 버튼 누를 필요 없이 바로 .... 메인화면으로 가게 할려면
<a href=javascript:history.back();>> 돌 아 가 기<</a>
이부분을 메인페이지 주소로 변경해주면 가능한가요 ?


<?php
function write($yoshi){
header("Content-Type: text/html");
echo "<html><head><title> Mail </title>
<style type='text/css'>
TEXTAREA{font-size:9pt;color:#8EAEFF;background-color:white;border:0;}{font-size:9pt}
body,input{font-size:9pt;color:#8EAEFF;background-color:white;border:0;}{font-size:9pt}
td{font-size:9pt;color:#8EAEFF;background-color:#D6E7FF;border:0;}
A:link    {font:9pt 돋움;color:#8EAEFF;text-decoration:none;}
A:visited {font:9pt 돋움;color:#8EAEFF;text-decoration:none;}
A:active  {color:#8EAEFF;font:9pt 돋움;}
A:hover  {color:#6365FF;text-decoration:underline;}
</style>
</head>
<body>
<center>
$yoshi
<br><br>
<a href=javascript:history.back();>> 돌 아 가 기<</a>
</center>
</body>
</html>
";
exit;
}
if(!$rtitle){
  $yoshi="제목을 입력하세요";
  write($yoshi);
}
if(!$sname){
  $yoshi="보내는 사람을 입력하세요";
  write($yoshi);
}
if(!$rsubject){
  $yoshi="내용을 입력하세요";
  write($yoshi);
}
if(!$semail){
  $yoshi="이메일 주소를 적어주세요";
  write($yoshi);
}
if(!$remail){
  $yoshi="받는분의 이메일 주소를 적어주세요";
  write($yoshi);
}
if(!ereg("@", $semail)){
  $yoshi="메일 주소를 정확히 입력하세요";
  write($yoshi);
}
if(!ereg("@", $remail)){
  $yoshi="이메일 형식이 잘못되었습니다";
write($yoshi);
}
$tagsubject = "
<table border=0 cellpadding=0 cellspacing=0 width=100% >
  <tr><td height=7></td></tr>
</table>
<style type=text/css>
a:link, a:visited, a:active { text-decoration:none; color:#CCCCCC }
a:hover { text-decoration:underline; color:red; }
td  { font-size:9pt }
</style>
<div align=center><table width=100% cellpadding=1 cellspacing=0 bgcolor=#6666ff>
<tr><td align=center><font face=굴림 class=main color=#F7FDFF> $rtitle </font></td></tr>
<tr><td>
<table width=100% cellpadding=3 cellspacing=0 bgcolor=#ffffff>
<tr><td bgcolor=#F7FDFF><font face=굴림 class=main>
</font></td></tr>
<tr><td>
<p align=center>$sname($semail)님이 보내신 메세지</p>
<br>
<pre>
$rsubject
</pre>
<br>
</font></td></tr>
</table>
</td></tr>
</table></div>
";
$headers = "From: $sname<$semail>\r\n";
$headers.= "Content-Type : text/html; charset=euc-kr\r\n";
$send = mail ($remail,$rtitle,$tagsubject,$headers);
if($send){
  $yoshi="메일을 성공적으로 보냈습니다";
  write($yoshi);
}
else{
  $yoshi="메일 전송 실패입니다 <br>다시 시도해 보세요";
  write($yoshi);
}
?>
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로