我试图向 PHP 文件发送一个值,但是当我检查时,这个值变成了null
.
我通过以下方式发送值:user_login.php?p_action=New_User
user_login.php 的代码是:
require("include/session_inc.php");
require("include/user_handling_inc.php");
require("include/db_inc.php");
start_Session(false, false);
switch ($p_action) {
case 'Login': {
$l_flag = verify_User($p_in_username, $p_in_password);
if ($l_flag == "Not_Found") {
$l_flag = "New_User";
}
break;
}
case 'Save_Profile': {
$l_flag = "Save_Profile";
break;
}
case 'New_User':
$l_flag = "New_User";
break;
case 'Create_New_User':
$l_flag = "Create_New_User";
}
switch ($l_flag) {
case 'New_User': {
include "include/user_new_inc.php";
break;
}
case 'Save_Profile': {
load_User_Data(" username = '$p_in_username' ", false);
include "include/user_profile_save_inc.php";
break;
}
case 'Wrong_Password':
echo "Wrong Pass";
break;
case 'OK':
load_User_Data(" username = '$p_in_username' ", true);
store_User_Cookie($g_userdata->user_id);
include "include/user_profile_inc.php";
break;
case 'Create_New_User':
$l_user_id = create_New_User ($p_in_username, $p_in_email, 'Y');
if ($l_user_id != -1) {
store_User_Cookie($l_user_id);
echo "Success !! <br><br> \n";
echo "<a href\"/index.php\"> Back to Main </a>";
}
break;
}