폼메일 전송 후, 페이지이동.... 정보
폼메일 전송 후, 페이지이동....본문
안녕하세요./
폼메일 작성 후, alert 나와서 감사합니다.~~ 이렇게 나온 후,
alert을 확인하면,, 설정 해 놓은 페이지로 이동을 했으면 하는데요.
쉽지가 않네요. ㅠㅠㅠㅠ
================================================// 아래는 사용중인 폼메일입니다.
<?php
function alert($msg='', $url='')
{
global $g4;
if (!$msg) $msg = '올바른 방법으로 이용해 주십시오.';
//header("Content-Type: text/html; charset=$g4[charset]");
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=$g4[charset]\">";
echo "<script language='javascript'>alert('$msg');";
if (!$url)
echo "history.go(-1);";
echo "</script>";
if ($url)
// 4.06.00 : 불여우의 경우 아래의 코드를 제대로 인식하지 못함
//echo "<meta http-equiv='refresh' content='0;url=$url'>";
goto_url('../');
exit;
}
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(!ereg("@", $semail)){
$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=left>
<table width=500 cellpadding=3 cellspacing=0 bgcolor=#f8f8f8>
<tr>
<td bgcolor=#F7FDFF><font face=돋움 class=main></font></td>
</tr>
<tr>
<td>
<div style=\"padding-left:40px; width:500px;\">
<br>
<br>
$sname($semail)님의 사전등록 내용입니다.
<br>
<br>
Name of Company : $sname<br><br>
Representatives : $rtitle<br><br>
Tel : $tel1-$tel2-$tel3<br><br>
Fax : $fax1-$fax2-$fax3<br><br>
<br>
Main Products : $rsubject<br><br>
<br>
</div>
</td>
</tr>
</table>
</div>
<div align=left>
<table width=500 cellpadding=3 cellspacing=0 bgcolor=#f8f8f8>
<tr>
<td>
<div style=\"padding-left:40px; width:500px;\">
Name : $mname<br><br>
Position : $pname<br><br>
Tel : $tell1-$tell2-$tell3<br><br>
Mobile : $hp1-$hp2-$hp3<br><br>
E-mail : $semail<br><br>
<br>
</div>
</td>
</tr>
</table>
</div>
";
$headers = "From: $sname<$semail>\r\n";
$headers.= "Content-Type : text/html; charset=euc-kr\r\n";
$remail = ""; // 받는사람 이메일
$send = mail ($remail,$rtitle,$tagsubject,$headers);
if($send){
/*
$yoshi="메일을 성공적으로 보냈습니다";
write($yoshi);
*/
echo "<script language='javascript'>alert('감사합니다. 사전등록신청이 접수되었습니다.','../'); this.close();</script>";
}
else{
/*
$yoshi="메일 전송 실패입니다 <br>다시 시도해 보세요";
write($yoshi);
*/
alert("죄송합니다. 다시 문의해 주세요!");
}
?>
======================================================== 난감합니다. ----//
혹시 소스 보신 후, 지나가는 길에 조언 한 마디 부탁드립니다.
그럼, 이만 총총!! // 감기 조심하세요!!!!
폼메일 작성 후, alert 나와서 감사합니다.~~ 이렇게 나온 후,
alert을 확인하면,, 설정 해 놓은 페이지로 이동을 했으면 하는데요.
쉽지가 않네요. ㅠㅠㅠㅠ
================================================// 아래는 사용중인 폼메일입니다.
<?php
function alert($msg='', $url='')
{
global $g4;
if (!$msg) $msg = '올바른 방법으로 이용해 주십시오.';
//header("Content-Type: text/html; charset=$g4[charset]");
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=$g4[charset]\">";
echo "<script language='javascript'>alert('$msg');";
if (!$url)
echo "history.go(-1);";
echo "</script>";
if ($url)
// 4.06.00 : 불여우의 경우 아래의 코드를 제대로 인식하지 못함
//echo "<meta http-equiv='refresh' content='0;url=$url'>";
goto_url('../');
exit;
}
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(!ereg("@", $semail)){
$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=left>
<table width=500 cellpadding=3 cellspacing=0 bgcolor=#f8f8f8>
<tr>
<td bgcolor=#F7FDFF><font face=돋움 class=main></font></td>
</tr>
<tr>
<td>
<div style=\"padding-left:40px; width:500px;\">
<br>
<br>
$sname($semail)님의 사전등록 내용입니다.
<br>
<br>
Name of Company : $sname<br><br>
Representatives : $rtitle<br><br>
Tel : $tel1-$tel2-$tel3<br><br>
Fax : $fax1-$fax2-$fax3<br><br>
<br>
Main Products : $rsubject<br><br>
<br>
</div>
</td>
</tr>
</table>
</div>
<div align=left>
<table width=500 cellpadding=3 cellspacing=0 bgcolor=#f8f8f8>
<tr>
<td>
<div style=\"padding-left:40px; width:500px;\">
Name : $mname<br><br>
Position : $pname<br><br>
Tel : $tell1-$tell2-$tell3<br><br>
Mobile : $hp1-$hp2-$hp3<br><br>
E-mail : $semail<br><br>
<br>
</div>
</td>
</tr>
</table>
</div>
";
$headers = "From: $sname<$semail>\r\n";
$headers.= "Content-Type : text/html; charset=euc-kr\r\n";
$remail = ""; // 받는사람 이메일
$send = mail ($remail,$rtitle,$tagsubject,$headers);
if($send){
/*
$yoshi="메일을 성공적으로 보냈습니다";
write($yoshi);
*/
echo "<script language='javascript'>alert('감사합니다. 사전등록신청이 접수되었습니다.','../'); this.close();</script>";
}
else{
/*
$yoshi="메일 전송 실패입니다 <br>다시 시도해 보세요";
write($yoshi);
*/
alert("죄송합니다. 다시 문의해 주세요!");
}
?>
======================================================== 난감합니다. ----//
혹시 소스 보신 후, 지나가는 길에 조언 한 마디 부탁드립니다.
그럼, 이만 총총!! // 감기 조심하세요!!!!
댓글 전체
alert 가로 메시지 쉼표 이동주소 가로
새로운나라님 감사합니다.////
적용해 봤는데요,,
제가 아이프레임으로 넣어서 그런지 원하는 페이지로 이동이 안돼요.. ㅠㅠㅠㅠ
적용해 봤는데요,,
제가 아이프레임으로 넣어서 그런지 원하는 페이지로 이동이 안돼요.. ㅠㅠㅠㅠ
echo "<script language='javascript'>alert('감사합니다. 사전등록신청이 접수되었습니다.');top.location.href='이동할 페이지주소;</script>";
위와같이 하니까, 적용이 잘됐답니다.!!
이동문제로 고민하시던 분들 활용하세요!!
위와같이 하니까, 적용이 잘됐답니다.!!
이동문제로 고민하시던 분들 활용하세요!!
덕분에 저도 해결했어요~~ 감사합니다 ^^*
감사합니다~~ㅎㅎ