What's happening to my session data? Help!
-
I’m debugging an old aggregator plugin (BDP RSS) so that it will work with WordPress 3.x, but it seems like something squirrely is going on with our session data. Specifically, we are submitting a form where the action on the submit is pointing to the same PHP page. The data is filled in on the form. However, when viewing the $_POST array after the submit, it is empty. We aren’t sure what could cause the session data to get lost.
Here’s a critical piece of code:
/* ----- Capture and process form variables ----- */ error_log("in bdp-rssadmin 1"); print_r($_POST); if( isset($_POST['bdprss_add_feed_button']) ) { error_log("in bdp-rssadmin 2 - inside IF statement"); $r = bdpSetFeed($_POST['bdprss_new_feed_name']); if($r) echo $r; }
The statements
error_log("in bdp-rssadmin 1");
anderror_log("in bdp-rssadmin 2 - inside IF statement");
are being used to debug this. In our error log, we can see that it’s making it through the first statement, but not the second, and that would seem to indicate what we know already: that the $_POST array is empty (i.e. not being set). As an fyi, we’re using theprint_r($_POST);
statement to print the contents of that array to the screen, but it’s always empty.Any thoughts?
- The topic ‘What's happening to my session data? Help!’ is closed to new replies.