Need an advice on best solution - whether to load memory or cpu.
Subj: script performing calculations based on the user input (2 mandatory + 3 optional elements) and outputting a result consisting of 48 to 144 elements.
solution 1
page1:
<form method="post" action="page2">
page2:
calculations are made based on post data, result returned as a big array and written to $_SESSION.
page redirected to page3.
page3:
displaying result by reading $_SESSION.
! data in $_SESSION are kept
solution 2
page1:
<form method="post" action="page2">
page2:
input data is written to $_SESSION (for further use)
page redirected to page3.
page3:
calculations are made based on $_SESSION.
displaying result.
! each time the page is reloaded the calculation script will execute once more.
any advice?
Subj: script performing calculations based on the user input (2 mandatory + 3 optional elements) and outputting a result consisting of 48 to 144 elements.
solution 1
page1:
<form method="post" action="page2">
page2:
calculations are made based on post data, result returned as a big array and written to $_SESSION.
page redirected to page3.
page3:
displaying result by reading $_SESSION.
! data in $_SESSION are kept
solution 2
page1:
<form method="post" action="page2">
page2:
input data is written to $_SESSION (for further use)
page redirected to page3.
page3:
calculations are made based on $_SESSION.
displaying result.
! each time the page is reloaded the calculation script will execute once more.
any advice?