Using multiple submits on a page and retaining $POST data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, and I would like to thank everyone that attempts to help me out. I
have looked long and hard online before I resorted to this.

My problem is that I have a page that relies on multiple submits and data
from what was submitted. example:

// 1. some sort of drop down
// 2. submit button
// 3. display data retrieved from database
// 4. user enters more information
// 5. second submit button, run checks to vertify all data is entered
// 6. enter data into database

The problem is in step 5, when the user hits the second submit and data is
checked before db submission, I am losing the data displayed by the first
submit button

This is what I have tried

ive tried using POST and SESSION variables to display the data, but this
doesnt work. this is because in my code i have an if isset statement to
check if submit has been pressed,  then the variables are retrieved from the
db and used. when clicking the second submit button and checks are done, the
top portion of the page of information retrieved by the first submit are
nothing but blanks because the first submit is no longer set (using isset)

my next idea was to save the variable selected in the first drop down (step
1) and requery with this selection at the second submit button to retrieve
and redisplay the data. this did not work because this variable was set back
to "" because the drop down resets itself on each submit. disabling the drop
down if the first submit is set and then setting the variable did not work
either because when the second submit is hit, the first submit is no longer
set, so the drop down is displayed, the variable is set to "" and i get
nothing in my variable. this also was the case if i made it a global
variable.

so basically i have resorted to just googling things and trying out
different arrangements of code to no avail. I need a way to hold the data on
the top half of the screen while the bottom half is being manipulated. any,
and i mean any help at this point would be GREATLY appreciated! Thank you.

Onochie

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux