קצת סדר בדברים
PHP קוד:
global $userdata, $userdata2;
$page=$_GET['mode'];
$mail=$_GET['mail'];
$error=$_GET['error'];
if($mail == 'sent') {
include('filemail.php?mode=done');
} else if ($mail == 'failed') {
include('filemail.php?mode=failed');
} else if (empty($page)) {
include('file1.php');
} else if ($page == "2" && $error == "wrong") {
include('file2.php?error=wrong');
} elseif ($page == "1" && $error == "wrong") {
include('file1.php?error=wrong');
} else {
include("file" . $page . ".php");
}
אני רואה שהקוד הבא הוא חלק בפונקציה, האם נסית לקרוא למשתנים $page $main $error מפונקציה אחרת/מחוץ לפונקציה, או שהפוסט עצמו נעלם?