php에서 php로 시간값을 넘기려고해요~
본문
제가 해본 코드인데요 ㅜ 틀린데가 있나요 ㅜㅜ
<html>
<head>
<title> New Document </title>
</head>
<body>
<form method="post" action="test2.php">
<? $regdate = date("YmdHis") ?>
<input type="submit" value="시간확인">
</form>
</body>
</html>
아래는 test2.php 페이지 인데요
값이 제대로 출력이 안되서 echo문이랑 alert까지 실행해 봤어요 ㅜ
<?php
$regdate = $_POST['regdate'];
echo "<script> alert($regdate); </script>";
echo $regdate;
?>
답변을 작성하시기 전에 로그인 해주세요.