No Session after Validation
Hi Ray,
your fix doesn't solve my problem. I think there is a problem between the form validation and the sessions. The validation rules work fine. If i put the following code block outside the "if (isset($_POST["XOX_Shop_Checkout_1_x"]) || isset($_POST["XOX_Shop_Checkout_1"])) {" if block, the validation works, but the Sessions are not displayed in my input fields (i left one reqiered field empty and then i am redirected to the same page i posted from).
Block:
$_SESSION['re_plz'] = (isset($_POST['postcode'])?$_POST['postcode']:"");
$_SESSION['re_stadt'] = (isset($_POST['city'])?$_POST['city']:"");
$_SESSION['re_strasse2'] = (isset($_POST['street2'])?$_POST['street2']:"");
$_SESSION['re_strasse1'] = (isset($_POST['street1'])?$_POST['street1']:"");
$_SESSION['re_fax'] = (isset($_POST['fax'])?$_POST['fax']:"");
$_SESSION['re_telefon'] = (isset($_POST['phone'])?$_POST['phone']:"");
$_SESSION['re_email'] = (isset($_POST['email'])?$_POST['email']:"");
$_SESSION['re_name'] = (isset($_POST['lastname'])?$_POST['lastname']:"");
$_SESSION['re_vorname'] = (isset($_POST['firstname'])?$_POST['firstname']:"");
if(isset($_POST['eC_SameAs'])&&($_POST['eC_SameAs'] == true)) {
$_SESSION['li_plz'] = (isset($_POST['postcode'])?$_POST['postcode']:"");
$_SESSION['li_stadt'] = (isset($_POST['city'])?$_POST['city']:"");
$_SESSION['li_strasse2'] = (isset($_POST['street2'])?$_POST['street2']:"");
$_SESSION['li_strasse1'] = (isset($_POST['street1'])?$_POST['street1']:"");
$_SESSION['li_fax'] = (isset($_POST['fax'])?$_POST['fax']:"");
$_SESSION['li_telefon'] = (isset($_POST['phone'])?$_POST['phone']:"");
$_SESSION['li_email'] = (isset($_POST['email'])?$_POST['email']:"");
$_SESSION['li_nachname'] = (isset($_POST['lastname'])?$_POST['lastname']:"");
$_SESSION['li_vorname'] = (isset($_POST['firstname'])?$_POST['firstname']:"");
} else {
$_SESSION['li_plz'] = (isset($_POST['shipping_postcode'])?$_POST['shipping_postcode']:"");
$_SESSION['li_stadt'] = (isset($_POST['shipping_city'])?$_POST['shipping_city']:"");
$_SESSION['li_strasse2'] = (isset($_POST['shipping_street2'])?$_POST['shipping_street2']:"");
$_SESSION['li_strasse1'] = (isset($_POST['shipping_street1'])?$_POST['shipping_street1']:"");
$_SESSION['li_fax'] = (isset($_POST['shipping_fax'])?$_POST['shipping_fax']:"");
$_SESSION['li_telefon'] = (isset($_POST['shipping_phone'])?$_POST['shipping_phone']:"");
$_SESSION['li_email'] = (isset($_POST['shipping_email'])?$_POST['shipping_email']:"");
$_SESSION['li_nachname'] = (isset($_POST['shipping_lastname'])?$_POST['shipping_lastname']:"");
$_SESSION['li_vorname'] = (isset($_POST['shipping_firstname'])?$_POST['shipping_firstname']:"");
When i put the block into the if clause, then the session values are displayed in the input fields. Then i fill the last required field. the validation runs and i am redirected to the next page. there i display all session values again as text. but the last inserted value is missing.
if i re run the validation, the last session values are not rewritten.
Can u help again?
Greetings, Carsten.