jquery - Redirect header function to replace a poll "thank you" page already in place with PHP -
i have php poll in place, i've set have multiple (10), after each poll submission instead of saying "thank you, blah blah"... wanting go right next poll questions.
this have.
the poll has functionality on "thank you" page has "continue next poll" button, want remove button , page , have go right poll automatically. best way think of forward header.
example of button in place forwards next poll:
<a href="<?php the_return_to_url(); ?>">next</a> so if 1 me convert used this:
<?php header('location: http://'); ?> the "the_return_to_url()" determines poll on , goes 1.
here function:
function the_return_to_url() { global $requested_poll_id; global $valid_polls; $poll = $valid_polls[$requested_poll_id]; if(!empty($poll->returntourl)) { echo $poll->returntourl; } else { vote_die("error: return url not defined poll."); } }
without modification of original function:
<?php ob_start(); the_return_to_url(); header('location: http://'.ob_get_clean()); die(); ?>
Comments
Post a Comment