본문 바로가기
낙서장/php홈페이지 만들기

쓰기 게시판

by "뭉치" 2021. 8. 13.
728x90

 

 

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">

<title>PHP 게시판 프로젝트 - 쓰기</title>



<STYLE TYPE="text/css">

BODY,TD,SELECT,input,DIV,form,TEXTAREA,center,option  {font-family:굴림;font-size:9pt;color:#555555;}

A:link    {color:black;text-decoration:none;}

A:visited {color:black;text-decoration:none;}

A:active  {color:black;text-decoration:none;}

A:hover  {color:gray;text-decoration:none;}

</STYLE>



<script language="javascript">

function check_submit(){

var ff = document.myForm;

if( ff.name.value == "" ) {

alert("이름을 입력하세요");

ff.name.focus();

return;

}

if( ff.password.value == "" ) {

alert("비밀번호를 입력해야 글을 수정하거나 삭제할 수 있습니다.");

ff.password.focus();

return;

}

if( ff.subject.value == "" ) {

alert("제목을 입력하세요");

ff.subject.focus();

return;

}

ff.action = "write_ok.php";

ff.submit();

}

</script>



</head>

<body bgcolor=white background=./images/body_bg.gif>

<img src=./images/maintitle.gif>

<br>



<form name='myForm' method='post'>



<table border=0 cellspacing=1 cellpadding=0 width=670>

<tr>

<td align=center>

<font color=green> <b> 글 쓰기 화면입니다. </b> </font>

</td>

</tr>

</table>



<table border=0 bgcolor=#CCCCF> <tr> <td>



<table border=0 width=670 cellspacing=0 cellpadding=0 bgcolor=#F0F0F0>



<col width=100></col><col width=></col>



<tr>

   <td colspan=2>

     <table border=0 cellspacing=0 cellpadding=0 width=100%>

       <tr>

          <td width=100 align=right><b>이름&nbsp;</b></td>

          <td><input type=text name=name size=20  maxlength=20></td>         

         <td width=100 align=right><b>비밀번호&nbsp;</b></td>

          <td><input type=password name=password  size=20  maxlength=20></td>

      </tr>

</table>

  </td>

</tr>



<tr><td bgcolor=white height=1 colspan=2></td></tr>



<tr>

  <td align=right><b>전자우편&nbsp;</b></td>

  <td> <input type=text name=email size=40  maxlength=200> </td>

</tr>



<tr><td bgcolor=white height=1 colspan=2></td></tr>



<tr>

  <td align=right><b>홈페이지&nbsp;</b></td>

  <td> <input type=text name=homepage size=40  maxlength=200> </td>

</tr>



<tr><td bgcolor=white height=1 colspan=2></td></tr>



<tr>

  <td align=right><b>제목&nbsp;</b></td>

  <td> <input type=text name=subject size=87  maxlength=200> </td>

</tr>



<tr><td bgcolor=white height=1 colspan=2></td></tr>



<tr>

  <td align=right><b>내용&nbsp;</b></td>

  <td valign=top>

  <textarea name=memo cols=85 rows=20></textarea>

  </td>

</tr>



</table>



<br>



<table border=0 width=670>

<tr><td>

<center>

<a href="javascript:check_submit();"><img src='./images/write.gif' border=0></a>   

<a href=# onclick=history.back()><img src=./images/list.gif border=0></a>

</center>

</td></tr>

</table>

</td></tr></table>



</form>



</body>

</html>







-------------------------------------- result page( write_ok.php )



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">

<title> </title>

</head>

<body>



<?

echo "이름 : $name <br>";

echo "비밀번호 : $password <br>";

echo "전자우편 : $email <br>";

echo "홈페이지 : $homepage <br>";

echo "제목 : $subject <br>";

echo "내용 : $memo <br>";

?>



</body>

</html>
728x90

댓글