Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Quick question, I have a custom options page which posts to options.php, however I have a few sections to my options page where i change the post url like so: <form action='options.php?section=sectionname' ..>

when the options page reloads I need to check which section was just saved i.e. get the sectionname from the querystring, however the options.php page redirects to the options-general.php page and does not retain my query string.

can anyone think of either a way to retain the QS or tell me a better way to do this?

Thanks

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

How about putting the current section in a hidden form field inside each section, and then when you reload the page, check $_POST['section']?

share|improve this answer
    
I've found a way around it in the end as you mentioned using the hidden field and a jquery click to set it then using get_option(...).. as i'm using custom options. –  Alex Jun 18 '12 at 18:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.