내 컴퓨터 사이언스 클래스에 대한 로고 퀴즈를 만들고 있는데, 사용자 이름과 이메일 주소를 등록하는 페이지가 많습니다. 사람들을 성공적으로 등록하면 index.php로 리디렉션됩니다.페이지간에 변수를 보유하는 세션
페이지가 리디렉션되면 등록이 완료되었다는 녹색 상자가 표시되며 자세한 지침이 제공됩니다.
테스트 할 때마다 index.php를 방문 할 때마다 전자 메일과 사용자 이름에 아무것도 표시하지 않습니다. 등록 페이지 자체 (RegSpelers.php)에서
<!--- Notice itself --->
<?php
session_start();
if(isset($_SESSION)){
$email = $_SESSION["email"];
$username = $_SESSION["username"];
?>
<!--- Green box that pops up --->
<div class="notice success"><i class="icon-ok icon-large"></i> Je registratie is succesvol verzonden <?php echo $username;?><br>
Er is een email verzonden naar <?php echo $email; ?>.<br>
Volg de instucties in deze mail om te kunnen beginnen<a href="#close" class="icon-remove"></a></div>
<?php
session_destroy();
} ?>
이 코드
<?php }elseif($wrong == FALSE && !empty($_POST)){
// After checking for wrong entered field or nothing at all use session.
$_SESSION["email"] = $email;
$_SESSION["username"] = $username;
header ('Location: index.php');
} ?>
을 찾고 무엇입니까? –