Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

92
Views
redirect after click submit

I have a page on WordPress, that has a button and when the user clicks this button it will save the page, and the link change to the page link.

What I want is to make the user redirect to another page URL after clicking this button and the page gets saved.

these are the buttons, but I want to make the redirect work on both or only the Submit for Review button.

<?php do_action( 'tutor/dashboard_course_builder_form_field_after', $post ); ?>

                            <div class="tutor-form-row tutor-form-submit">
                                <div class="tutor-form-col-12">
                                    <div class="tutor-form-group">
                                        <div class="tutor-form-field tutor-course-builder-btn-group">
                                            <button type="submit" class="tutor-button btn-save-as-draft"
                                                    name="course_submit_btn"
                                                    value="save_course_as_draft"><?php esc_html_e( 'Save course as draft', 'edumall' ); ?></button>
                                            <?php if ( $can_publish_course ) :  ?>
                                                <button class="tutor-button tutor-success" type="submit"
                                                        name="course_submit_btn"
                                                        value="publish_course"><?php esc_html_e( 'Publish Course', 'edumall' ) ; ?></button>
                                            <?php else : ?>
                                                <button class="tutor-button tutor-success" type="submit"
                                                        name="course_submit_btn"
                                                        value="submit_for_review"><?php esc_html_e( 'Submit for Review', 'edumall' );  ?></button>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In PHP redirections are handled by the header() function, in the form:

header("Location: http://www.example.com/");

But make sure you are editiog the PHP file that proccess the form data (the action attibute probabily is pointing to the file). Note that the "header()" function will redirects the page before any output and no content outputed from the page will display. You can check other strategies at the function documentation page.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!