Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

94
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda