|
Posted by ATDave on 12/04/07 22:12
On Dec 4, 5:00 pm, Michael Fesser <neti...@gmx.de> wrote:
> .oO(ATDave)
>
>
>
> >So basically I'm just creating a form that I want the results e-mailed
> >to somebody. I have everything working except for the checkmark
> >sections that can have multiple answers. I'm a newbie when it comes
> >to PHP, so please be easy :)
>
> >So to show an example:
>
> ><input type="checkbox" name="SelfDevelopmentInterest[]" class="other"
> >value="Self Confidence" />
> ><label class="left">Self Confidence</label> <br />
> ><input type="checkbox" name="SelfDevelopmentInterest[]" class="other"
> >value="Hair Make up" />
> ><label class="left">Hair/Make-up</label> <br />
> ><input type="checkbox" name="SelfDevelopmentInterest[]" class="other"
> >value="Poise Posture" />
> ><label class="left">Poise/Posture</label> <br />
> ><input type="checkbox" name="SelfDevelopmentInterest[]" class="other"
> >value="Interview Skills" />
> ><label class="left">Interview Skills</label> <br />
>
> >This is the checkbox options a user has. So on my confirmation page I
> >create the variable:
>
> >$SelfDevelopmentInterest = $_POST['SelfDevelopmentInterest'];
>
> >In the actual message, currently I print it out like this:
>
> >Self-Development Interest: $SelfDevelopmentInterest
>
> >When I get the e-mail, it only displays "Array". Say a user checks
> >the first three options, how can I pass all three and print it out in
> >the e-mail?
>
> For a really simple array print use either print_r() or var_dump(). For
> a more sophisticated result you would have to loop through the array and
> print out the values yourself in the way you like.
>
> Micha
Thanks for the quick response. I don't know how to write the code for
an array, but I did try a couple things based on some
searching...unfortunately they did not work. I would assume I have to
do a loop through the array to print out the values...but should those
get assigned to more variables (one for each option) so that I can
actually pass them through in the e-mail?
Navigation:
[Reply to this message]
|