title: Warning: implode() [function.implode]: Invalid arguments passed in
body: <p>Hi I already checked all the posts with the same title but none helps me. First of all I'm a complete newbie and trying to make sendmail.php to get the information from short contact form  I got a premade script and try to add a checkbox but not sure how to grep and send is the box checked or not and send to email.</p>
  
  <p>This is the script:</p>
  
  <pre><code>$to="admin@email.com";/*Your Email*/
  $subject=$_REQUEST['subject'];
  
  $date=date("l, F jS, Y");
  $time=date("h:i A");
  
  $firstName=$_REQUEST['name'];
  $email=$_REQUEST['email'];
  $phone=$_REQUEST['phone'];  
  $hosting = (implode(',', $_POST['hosting']));
  
  
  $msg="  Message from contact form sent:  $date, hour: $time.\n  
      Име: $firstName\n
      Email: $email\n 
      Телефон: $phone 
      Хостинг:  ".$hosting."\r\n
      ";
  
  
  
  if($email=="") {
  echo "&lt;div class='alert alert-danger'&gt;
            &lt;a class='close' data-dismiss='alert'&gt;×&lt;/a&gt;
            &lt;strong&gt;Warning!&lt;/strong&gt; Fill all boxes.
        &lt;/div&gt;";
  } else {
  mail($to,$subject,$msg,"From:".$email);
  echo "&lt;div class='alert alert-success'&gt;
            &lt;a class='close' data-dismiss='alert'&gt;×&lt;/a&gt;
            &lt;strong&gt;Will contact with you.&lt;/strong&gt;
        &lt;/div&gt;";
  }
  </code></pre>
  
  <p>And this is the part of the contact form code :</p>
  
  <pre><code>input type="checkbox" name="hosting[]" value="Get Hosting"
  </code></pre>
  
  <p>See:</p>
  
  <p><img src="https://tedbg.com/wp-content/uploads/2016/11/1.png" alt=""></p>