Variable not stored
-
Hi
I’m having some trouble in some browsers.
I’ve a form in PAGE_A, where users can write a “password”, and then, is sended via _POST to PAGE_B.
PAGE B:
$wp_session = WP_Session::get_instance(); if(isset($_POST['code'])) { $code = $_POST['code']; $wp_session['vip_code'] = $code; } echo '<META HTTP-EQUIV="Refresh" Content="0; URL=PAGE_C">'; exit; ?>
PAGE C:
$code = 1234; $wp_session = WP_Session::get_instance(); if ( !is_page('PAGE_A')) { if ($wp_session['vip_code'] != $code) { ?> echo '<META HTTP-EQUIV="Refresh" Content="0; URL=PAGE_A">'; exit; <?php } } ?>
The problem is, that in safari, or IE, the variable seems to not being stored.
In chrome and firefox, seems to work fineAlso, i’ve added that code into functions.php
add_filter( 'wp_session_expiration', function() { return 60 * 60 * 24; } );
There is something wrong in my code?
Thanks a lot
- The topic ‘Variable not stored’ is closed to new replies.