L
L
lawer852017-11-06 18:29:03
DLE
lawer85, 2017-11-06 18:29:03

How to make automatic transition from one news to another after filling out the form in the first news on DLE 10.4?

Hello!
Generally there is a category and a subcategory. Each has its own template for the full news. In the category, the news template contains a form that is processed by a separate send.php file (not related to the DLE engine in any way). I need that after filling out the form and sending the user's data, it will be redirected to the news with the same name only in the subcategory, but the full content of the news is already there.
It turns out that in the send.php file, after processing the data, you need to define a link to the news with the same name in the subcategory and redirect it there using the header( ) function. I just don't know how to implement it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
ree4i, 2017-11-14
@lawer85

Isn't it more convenient to submit the form via ajax and then redirect to done js?
Or you can include send.php in show.full.php via a condition. Those. add a hidden input to the form itself, and write in show.full.php like if ( $_REQUEST['hidden'] == 'send' ) include_once 'send.php';
Sending address in both cases - the address of the second news through additional fields to prescribe.
You can do whatever you want, but searching in send.php for news in the database by name and category is an extra request. It only makes sense if this news is mass-produced.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question