我正在寻找基于序列化错误的翻译。
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]
这是被忽略并跳到顶层?任何帮助是极大的赞赏。
好的,我现在解决了这个问题。
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);
感谢您的调查。
谢谢
和我
Zagorax 可以...这是管理注册表单的代码...
<?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();
?>