Jump to content

2 buttons on the same form using the same var.


phpweb

Recommended Posts

i have a form that has 2 buttons.  Update and Confirm.

 

Update processes a quantity and populates all fields just fine.

 

When I press the Confirm button, I want it to check to see if the Update button was pressed successfully or to see if the $total var was set.

 

But, once I press update and it populates, $total is set to, say 13.99.  When I press Confirm, total is now 0.

 

How to I make it a 2 step process,  Press Update and generate all fields successfully, then press Confirm, checks to see if update was pressed and go to the next page.

 

Thank you

lots of javascript (not really a lot, but some)

 

i would have the confirm button disabled at first. once the update button is pressed for the first time (or every time, since it won't matter after the first) then you enabled the confirm button.

 

what does your code look like so far?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.