"PHP 자신에게 폼 제출"의 두 판 사이의 차이

(새 문서: 분류: PHP 분류: Form)
 
1번째 줄: 1번째 줄:


==test.php==
<source lang='php'>
<?php
$action = '';
if(isset($_POST['action']))$action = $_POST['action'];
if($action == 'form_submit') {
  //폼 입력 처리
}
?>
<form methed="post" action="test.php">
<input type="hidden" name="action" value="form_submit" />
<textarea name="textarea1"></textarea>
</form>
</source>





2012년 4월 1일 (일) 02:31 판

test.php

<?php
$action = '';
if(isset($_POST['action']))$action = $_POST['action'];
if($action == 'form_submit') {
  //폼 입력 처리
}
?>
<form methed="post" action="test.php">
<input type="hidden" name="action" value="form_submit" />
<textarea name="textarea1"></textarea>
</form>
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}