複数ステップのフォームを作成したいのですが、displayStep1() に問題があります。私の問題を見つけて解決するのを手伝ってください。すべてに感謝します。
致命的なエラー: 未定義関数 displayStep1() の呼び出し
if ( isset( $_POST["up_login"] ) and $_POST["up_login"] == 'up_login' )
{
include 'forms/up_login.php';
}
elseif ( isset( $_POST["up_info"] ) and $_POST["up_info"] == 'up_info' )
{
if ( isset( $_POST["step"] ) and $_POST["step"] >= 1 and $_POST["step"]<= 5 )
{
call_user_func( "processStep" . (int)$_POST["step"] );
}
else
{
displayStep1();
}
function processStep1()
{
displayStep2();
}
function processStep2()
{
if ( isset( $_POST["continue"] ) and $_POST["continue"] =="< Back" )
{
displayStep1();
}
else
{
displayStep3();
}
}
function processStep3()
{
if ( isset( $_POST["continue"] ) and $_POST["continue"] =="< Back" )
{
displayStep2();
}
else
{
displayComplete();
}
}
function processStep4()
{
if ( isset( $_POST["complete"] ) and $_POST["complete"] =="< Back" )
{
displayStep3();
}
else
{
displaySuccess();
}
}
function displayStep1()
{
include 'update_step1.php';
}
function displayStep2()
{
include 'update_step2.php';
}
function displayStep3()
{
include 'update_step3.php';
}
function displayComplete()
{
include 'update_step4.php';
}
function displaySuccess()
{
include 'update_step1.php';
}
}
else
{
include 'forms/up_account.php';
}