Go back to PREVIOUS screen without losing "INFORMATION" from previous screen

Asked

Viewed 4,429 times

-1

I have Screen 01, I do a search and return the result on the screen itself. Each line of the returned result contains a button.

The button sends me the SCREEN 02. On screen 02 I do a search and the values of the search are returned in the own SCREEN 02. Each row returned from the result contains a button.

I would like to click on this button of SCREEN 02 and returns to SCREEN 01 ALREADY WITH SCREEN SEARCH RESULT 01 DONE (STEP 02).

Below put images to TRY to illustrate the sequence and intended result:

inserir a descrição da imagem aqui

I click the button and do the search:

inserir a descrição da imagem aqui

I click the MARK button and go to SCREEN 02:

inserir a descrição da imagem aqui

I click ON SCREEN 02 SEARCH and return the search:

inserir a descrição da imagem aqui

How to proceed to, by clicking the MARK button on Screen 02, return to the SCREEN 01 STEP 02? In this case, Gilberto would appear on screen 01.

  • Have you ever worked with Datatables? Take a look at this link below: https://datatables.net/examples/styling/bootstrap4.html Here you can search the data on the screen only by searching. See if you can adapt. Hugs

  • Good afternoon. @Leandro Azevedo.. I even understood the link that you passed, but I think because of my lack of experience I didn’t see how it would fit in solving the problem of going back to the previous page. To mount Datatables would have to be the same way as I do today.. and when I arrived on SCREEN 02 and hit MARK ????????? Here’s the thing: Get back to the table ready the way it was. As I said and reiterate here I may not have seen the solution in the link you posted by the lack of experience in php. Hugs.

  • Hello, you are working with PHP on these screens?

  • ola :) @Leandro Azevedo... I’m sorry everyone.. I guess I didn’t really mention the tools I use.. HTML... PHP and JS scripts. Hugs

2 answers

0

You can use a PHP session

Page 1:

session_start()
$_SESSION['valor1'] = $valor1;

Calling value on page 2:

session_start() //inicia sessao
echo $_SESSION['valor1']; // Valor já pode ser solicitado

0

Your question can be solved by javascript / Html5. This is the solution I would implement: screen 2 would be modal (open on top of screen 1). When the user clicks on the button the required data on screen 1 would be read on screen two and populated the respective fields on screen 1. If any information has to be written to the server, you can do by ajax.

Link to build a modal window: https://www.webdesignerdepot.com/2012/10/creating-a-modal-window-with-html5-and-css3/

Another solution would be to use cookies or web.

  • Good afternoon @Manuel Gerardo Pereira.. Thanks for your attention. Very cool this MODAL... I didn’t know. I am reading to see viability as a whole.. As soon as I understand it and get something or not getting it.. I return to you.. Thanks again for your attention. :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.