폼전송을 통해서 페이지를 이동하기 입니다.

· 10년 전 · 307

function location_href( $url, $msg="" )
{
 global $g4;

 $array_url = parse_url($url);
 $formname = "form" . time();
 $query = explode("&", $array_url[query]);

 echo "<meta http-equiv='content-type' content='text/html; charset=$g4[charset]'>";

 echo "<form id='$formname' method='get' action='$array_url[path]'>";

 foreach ( $query as $key => $val )
 {
  list( $key2, $val2 ) = explode("=", $val);
  echo "<input type=hidden name=$key2 value='$val2'>";
 }

 echo "</form>";

 echo "<script language='javascript'>";
 if ( $msg )
  echo "alert(\"$msg\");";
 echo "document.getElementById('$formname').submit();";
 echo "</script>";

 exit;
}
 

|
댓글을 작성하시려면 로그인이 필요합니다.

팁게시판

디자인과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
제목 글쓴이 날짜 조회
10년 전 조회 555
10년 전 조회 712
10년 전 조회 442
10년 전 조회 506
10년 전 조회 378
10년 전 조회 345
10년 전 조회 354
10년 전 조회 340
10년 전 조회 345
10년 전 조회 300
10년 전 조회 309
10년 전 조회 804
10년 전 조회 308
10년 전 조회 272
10년 전 조회 283
10년 전 조회 253
10년 전 조회 300
10년 전 조회 281
10년 전 조회 246
10년 전 조회 212
10년 전 조회 378
10년 전 조회 258
10년 전 조회 260
10년 전 조회 245
10년 전 조회 239