How to use server validation on multiple select list with array i.e. name="select1[]" and then bind validation to the select list
can not get this to work
thanks,
Jim Balthrop
can not get this to work
thanks,
Jim Balthrop
see this post for details. It involves a checkbox group, but a multiple select list works the same way:
http://www.webassist.com/forums/posts.php?id=25800
Thanks Jason,
The validation and the binding validation works perfectly.
I have another problem with the page. I am using UE to send an email of the form information and on the email include page the select input is sent with this
$MailBody = $MailBody . "<strong>Items Purchased:</strong> ";
$MailBody = $MailBody . ((isset($_POST["select1"]))?implode(", ", $_POST["select1"]):"");
I am redirecting the page to itself with the email sent to ?success1 = true and am getting this error message
Warning: implode() [function.implode]: Invalid arguments passed in /home/pcogolf/public_html/WA_Universal_Email/WAUE_registrationnew_b_1.php on line 59
Warning: Cannot modify header information - headers already sent by (output started at /home/pcogolf/public_html/WA_Universal_Email/WAUE_registrationnew_b_1.php:59) in /home/pcogolf/public_html/registrationnew_b.php on line 46
Can I rename the implode function?
send a copy of the registartin page and the WA_Universal_Email/WAUE_registrationnew_b_1.php page so i can see the code.
you already have code at line 1 of the registration page to implode the form element.
you don't need to implode it again in the email.
the error is occurring because the array doesn't exist any more, it has already been converted to a comma separated list.
Jason, I have one more question that involves the array and sending the email with UE.
In the MailBody of the email, I have the array display and it displays properly as text (i.e. Platinum Sponsor $6000, Gold Sponsor $3000...and so on)
My question is on the MailBody I want the numerical value ($6000, $3000, etc) to total at another place on the MailBody.
I know I can do that with php array_sum, but if I make the select list values as numbers, then I can't get the text value.
Can you give me a suggestion as how to approach this?
thanks,
Jim Balthrop
I dont follow, please provide more details
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.