hope you guys can help with this, i`m getting this error within my error log:

PHP Warning: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in /home/myname/public_html/mysite.com/formmail.php on line 17

here is line 17:

$temp = implode(",<br />", $_POST);

I`m trying to pass a multiple selectbox to the email body, heres the select code:

<select name="licences[]" size="6" multiple="multiple" id="licences">

hope that makes sense :)

Recommended Answers

you need to make sure that $_POST is an array. When none of the options is selected, then there is NO such thing as $_POST!!!

if( is_array($_POST['licences']) )
{
  $temp = implode(",<br />", $_POST['licences']);
}
Jump to Post

All 3 Replies

you need to make sure that $_POST is an array. When none of the options is selected, then there is NO such thing as $_POST!!!

if( is_array($_POST['licences']) )
{
  $temp = implode(",<br />", $_POST['licences']);
}
commented: very helpful, thankyou +0

perfect, thank you so much :)

Midjam mark the thread as solved if your problem is solved...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.