シリアル化されたエラーに基づいてこれを翻訳しようとしています。
RewriteRule ^/?(register)\.html/errors/([^/]+) index.php?temp=register&errors= $1 [L]
RewriteRule ^/?(register)\.html index.php?temp=register [L]
これは無視され、トップ レベルにジャンプしますか? どんな助けでも大歓迎です。
シリアル化されたエラーに基づいてこれを翻訳しようとしています。
RewriteRule ^/?(register)\.html/errors/([^/]+) index.php?temp=register&errors= $1 [L]
RewriteRule ^/?(register)\.html index.php?temp=register [L]
これは無視され、トップ レベルにジャンプしますか? どんな助けでも大歓迎です。
Zagorax の OK... これはサインアップ フォームを管理するコードです...
<?php
/// Stage 1 check - create basic account and present options
require_once('../connections/application.php');
//// set the new connection to be able to write/update the DB
///// for writing database
$eggbox->close_eggbox();
$eggbox->connect_eggbox("write");
$eggbox_secure_checks = new eggbox_secure_checks;
$timenow = strtotime(date('Y-m-d H:i:s'));
////// Set the references
$PHPSESSIONID = $_SESSION['PHPSESSIONID'];
////// set credentials
$_SESSION['client_name'] = stripslashes(str_replace("'", "''", ($_POST['client_name'])));
$_SESSION['client_email'] = stripslashes(str_replace("'", "''", ($_POST['client_email'])));
$_SESSION['email_check'] = stripslashes(str_replace("'", "''", ($_POST['email_check'])));
$_SESSION['client_psw'] = $_POST['client_psw'];
$_SESSION['psw_check'] = $_POST['psw_check'];
$_SESSION['client_tel'] = stripslashes(str_replace("'", "''", ($_POST['client_tel'])));
$_SESSION['client_mobile'] = stripslashes(str_replace("'", "''", ($_POST['client_mobile'])));
if(isset($_POST['is_organisation'])){
$_SESSION['is_organisation'] = $_POST['is_organisation'];
} else {
$_SESSION['is_organisation'] = 0;
}
if($_SESSION['is_organisation'] == 1) {
$_SESSION['company_name'] = stripslashes(str_replace("'", "''", ($_POST['company_name'])));
$_SESSION['company_regno'] = stripslashes(str_replace("'", "''", ($_POST['company_regno'])));
$_SESSION['company_url'] = stripslashes(str_replace("'", "''", ($_POST['company_url'])));
} else {
$_SESSION['company_name'] = "Individual";
$_SESSION['company_regno'] = "";
$_SESSION['company_url'] = "";
}
if(isset($_POST['sign_up'])){
$_SESSION['sign_up'] = $_POST['sign_up'];
} else {
$_SESSION['sign_up'] = 0;
}
////// Checks for basic details are entered or relocate back with error messges
$error = array();
$i = 0;
if(($timenow - $_POST['timestampnow'] ) < 3){
$error[$i][0] = 1;
$error[$i][1] = 1;
$i++;
exit();
}
if($_SESSION['client_name'] == ""){
$error[$i][0] = 2;
$error[$i][1] = 'client_name';
$i++;
}
if($_SESSION['client_email'] == ""){
$error[$i][0] = 3;
$error[$i][1] = 'client_email';
$i++;
}
if($eggbox_secure_checks->validEmail($_SESSION['client_email']) == false){
$error[$i][0] = 15;
$error[$i][1] = 'client_email';
$i++;
}
if($_SESSION['client_email'] != $_SESSION['email_check']){
$error[$i][0] = 4;
$error[$i][1] = 'client_email';
$i++;
}
if($_SESSION['client_psw'] == ""){
$error[$i][0] = 5;
$error[$i][1] = 'client_psw';
$i++;
}
if($_SESSION['client_psw'] != $_SESSION['psw_check']){
$error[$i][0] = 6;
$error[$i][1] = 'client_psw';
$i++;
}
/////// Additional checks for companies
if($_SESSION['is_organisation'] != 0){
if($_SESSION['company_name'] == ""){
$error[$i][0] = 2;
$error[$i][1] = 'company_name';
$i++;
}
} /// End if
/////// If Error then return to checkout.php
if(!empty($error)){
$linkback = "../index.php?temp=register&errors=" . base64_encode(serialize($error)); ///// old link back
$linkback = "register.html?errors=" . base64_encode(serialize($error));
header('location: ' . $linkback); //// new linkback
} else { //// Process Transaction
////..........
header('location: ' . $linkback);
$eggbox->close_eggbox();
?>
わかりました、これで解決しました。
HTACCESS ファイル...
RewriteRule ^/?(register)\.html/errors/([^/]+) index.php?temp=register&errors=$1 [L]
RewriteRule ^/?(register)\.html index.php?temp=register [L]
RewriteRule ^/?(manage_user_account)\.html templates/manage_user_account.php [L]
メインphpファイルで
$linkback = "register.html/errors/" . base64_encode(serialize($error));
header('location: ' . $linkback);
でも調べてくれてありがとう。
ありがとう
そして私