한페이지에서 처리하기 정보
한페이지에서 처리하기본문
index.php
<form action="update.php">
<input type="text" name="ec" style="font-weight:bold; font-size:15px;" />
<input type="submit" value="확인" />
</form>
update.php
<?
$ec = $_POST['ec'];
echo md5($ec);
?>
를 한페이지에서 처리하고 싶습니다
고수님들~~ 방법좀 알려주세요!!
이해가 안가신다면 더 설명해드릴게요.
ajax를 사용하면 될것 같은데 어떻게 해야될지..모르겠네요.
저기 인풋에 hello 를 적고 확인누르면
페이지 이동,리로딩없이 hello 를 md5로 암호화한 코드만 나타나게 하는 법이요~
<form action="update.php">
<input type="text" name="ec" style="font-weight:bold; font-size:15px;" />
<input type="submit" value="확인" />
</form>
update.php
<?
$ec = $_POST['ec'];
echo md5($ec);
?>
를 한페이지에서 처리하고 싶습니다
고수님들~~ 방법좀 알려주세요!!
이해가 안가신다면 더 설명해드릴게요.
ajax를 사용하면 될것 같은데 어떻게 해야될지..모르겠네요.
저기 인풋에 hello 를 적고 확인누르면
페이지 이동,리로딩없이 hello 를 md5로 암호화한 코드만 나타나게 하는 법이요~
댓글 전체
<?
if ( $_POST['ec'] )
{
$ec = $_POST['ec'];
echo md5($ec);
}
else
{
?>
<form action="index.php">
<input type="text" name="ec" style="font-weight:bold; font-size:15px;" />
<input type="submit" value="확인" />
</form>
<? } ?>
이렇게 하면 한페이지에서는 될거같은데.. 리로딩은 거치겠네요..
if ( $_POST['ec'] )
{
$ec = $_POST['ec'];
echo md5($ec);
}
else
{
?>
<form action="index.php">
<input type="text" name="ec" style="font-weight:bold; font-size:15px;" />
<input type="submit" value="확인" />
</form>
<? } ?>
이렇게 하면 한페이지에서는 될거같은데.. 리로딩은 거치겠네요..