Date: 10/15/01
- Next message: Harpreet: "[PHP] Sub routines in php"
- Previous message: Taylor, Stewart: "RE: [PHP] Oracle query with one returned record"
- Maybe in reply to: Rudi Ahlers: "[PHP] Dynamic Forms"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
Something like this? (assumes a form field & variable called "orderType"
which will either be "credit" or "debit" -- tweak for your setup)
if (!isset($submit)) {
// show form
} else {
// do validation
// do generic stuff that happens for both credit & debit
if ($orderType == "debit") {
// mail debit card information
} elseif ($orderType == "credit") {
// mail credit card information
} else {
// do whatever happens for other types
// you could leave this bit out if you caught it at
// the validation stage earlier
}
// show thank you page
}
If that doesn't make any sense can you post the code for your form please?
Cheers
Jon
-----Original Message-----
From: Rudi Ahlers [mailto:kopspier <email protected>]
Sent: 15 October 2001 14:36
To: PHP General
Subject: [PHP] Dynamic Forms
Hi, me again
I have a form, which can either display debit order details, or credit card
details. When a user opens the page, he gets a dropdown menu, which gives
him the options. If he selects debit order, the debit order form gets
displayed, this is all done with if statements, no jscript. This works fine,
but with the mail part I have a problem. How would I be able to tell my mail
function what to mail, and what not to? When a user clicks on the debit
option, it must only email the debit form's details, as the forms differ
quite a bit. I tried doing it with a case statement, but with no luck.
Can anyone please help me with this?
Thanx
Rudi Ahlers
**********************************************************************
'The information included in this Email is of a confidential nature and is
intended only for the addressee. If you are not the intended addressee,
any disclosure, copying or distribution by you is prohibited and may be
unlawful. Disclosure to any party other than the addressee, whether
inadvertent or otherwise is not intended to waive privilege or confidentiality'
**********************************************************************
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Harpreet: "[PHP] Sub routines in php"
- Previous message: Taylor, Stewart: "RE: [PHP] Oracle query with one returned record"
- Maybe in reply to: Rudi Ahlers: "[PHP] Dynamic Forms"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

