我想创建一个多步骤表单,但我现在遇到了 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';
}