Re: Save and Continue

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

 



Dan Shirah wrote:

> Hello All,
> 
> I am trying to think through my new forms process.  I want to allow a
> customer to submit multiple orders using the same credit card.   At the
> bottom of my form I will have a "Save" link and a "Save and Submit
> Additional" link/checkbox.
> 
> Basically what I want to happen is that if the user clicks on "Save" it
> processes the form and sends them back to my homepage.
> 
> But if the user clicks "Save and Submit Additional", I want it to submit
> the first payment, then return to the same screen with the credit card
> information still populated to the fields and allow the user to enter in a
> new transaction.
> 
> I think my process for this would be something along the lines of:
> 
> if (isset($_POST['submit_additional'])) {
> 
>    include save.php
> }  //This would save the information just entered to the database
> 
> 
> By building a save.php file and including it only if needed, this would
> accomplish what I am trying to do, correct?
> 
> I'm open to any/all ideas :)

I think you can accomplish what you "want to do" just in a different way. I
think that you need to view the credit card phase as the last step, and
figure out a way to chunk up multiple independent "shopping cart" invoices.

Something like, "pay now" and "add new order"

if you have a PHP class, say "class invoice," which represents a shopping
cart, and use the serialize function to create a text variable which can be
stored in a database or session. Then a user can create and edit multiple
invoices, and as a last step go to billing and enter credit information.

You should NEVER EVER store, no matter how securely or temporarily, credit
card information unless you have major liability insurance.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux