0

I'm trying to figure out a basic web email form. I got the code from somewhere and am trying to make the checkboxes options.

The email gets sent but just has Array next to the option.

What am I doing wrong?

2
  • Hi and welcome Bryan, whack your code up for us to see (remove any db connection / sensitive data from it) Commented Nov 22, 2010 at 1:20
  • If you find correct answer, you should mark it as one! =) Commented Nov 22, 2010 at 1:33

2 Answers 2

2

Some sample code will help diagnose the problem. At a guess I'd say you've got something like

$message = "contact from message\r\n";
$message .= $_POST['check'];

since $_POST['check'] is an array, you need to use it like:

$message .= implode(', ', $_POST['check']);

This will convert the array of selected services options into a comma delimited string.

Sign up to request clarification or add additional context in comments.

1 Comment

Great! thank you! that worked! well when I did $check .= implode(', ', $_POST['check']);
0

If you are a PHP beginner, you can use PHP Forms builder that allows to create professionally looking email forms within just a few minutes. You will only need to make a PHP form by means of an intuitive interface and generate a code that can be easily copied and pasted to any web page.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.