close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Implode

Thread began 8/16/2010 8:40 am by rob294118 | Last modified 8/16/2010 10:44 am by Jason Byrnes | 2839 views | 7 replies |

rob294118

Implode

I have a couple list items where I use IMPLODE and it works fine.

I try to create another list field on my form and the form tells me the list does not support multiple list items. The implode statement does NOT work on this new field.

$MailBody = $MailBody . ((isset($_POST["Appointment_request_group_Type_of_event[]"]))?implode(", ", $_POST["Appointment_request_group_Type_of_event[]"]):"");

The email message value is empty.

Sign in to reply to this post

Jason ByrnesWebAssist

do not include the square brackets. change:

php:
$MailBody = $MailBody . ((isset($_POST["Appointment_request_group_Type_of_event[]"]))?implode(", ", $_POST["Appointment_request_group_Type_of_event[]"]):"");



to:

php:
$MailBody = $MailBody . ((isset($_POST["Appointment_request_group_Type_of_event"]))?implode(", ", $_POST["Appointment_request_group_Type_of_event"]):"");
Sign in to reply to this post

rob294118

I just tried it but it did not work.

Here is the section of code:

//Start Mail Body
$MailBody = $MailBody . "<html><head></head><body>\r\n";
$MailBody = $MailBody . "Event Type: ";
$MailBody = $MailBody . ((isset($_POST["Appointment_request_group_Type_of_event"]))?implode(", ", $_POST["Appointment_request_group_Type_of_event"]):""); $MailBody = $MailBody . "</body></html>";
//End Mail Body

Sign in to reply to this post

Jason ByrnesWebAssist

can you send the entire page so i can see the form code as well.

Sign in to reply to this post

rob294118

Files Attached

Files are attached.

Attached Files
files.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the multiple select list is named "Appointment_request_group_Event_Type[]":

php:
<select class="formListfield_Medium" name="Appointment_request_group_Event_Type[]" id="Appointment_request_group_Event_Type" tabindex="8" multiple="multiple" onblur="hideServerError('Appointment_request_group_Event_Type_ServerError');">



your implode code is using a form element named "Appointment_request_group_Type_of_event" instead:

php:
$MailBody = $MailBody . ((isset($_POST["Appointment_request_group_Type_of_event"]))?implode(", ", $_POST["Appointment_request_group_Type_of_event"]):"");




change that to use the correct form element name:

php:
$MailBody = $MailBody . ((isset($_POST["Appointment_request_group_Event_Type"]))?implode(", ", $_POST["Appointment_request_group_Event_Type"]):"");
Sign in to reply to this post

rob294118

Thank you!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...