Question: I'm a beginner with PHP and I'm building a sign-up form. Now I'm using also the type="checkbox" because I want to now with the form wich day people are visiting in a week.

When I'm processing the form everything goes well if somebody check one of the boxes, but not when people don't check one of the checkboxes, then I'll get a PHP Implode error.

```
<li><input class="bso" type="checkbox" name="day[]" value="monday"/> monday</li>
<li><input class="bso" type="checkbox" name="day[]" value="tuesday"/> tuesday</li>
<li><input class="bso" type="checkbox" name="day[]" value="wednesday"/> wednesday</li>
<li><input class="bso" type="checkbox" name="day[]" value="thursday"/> thursday</li>
<li><input class="bso" type="checkbox" name="day[]" value="friday"/> friday</li>

```

So what I need to know is, what kind of php code do I need to succesfully process my PHP code without getting a warning when somebody doesn't check one of the boxes, because sometimes the people that are gone use the form don't want to visit.

THNX!

Answer: 
The problem you are running into is that you need to check the existence of values for `day` in the POST and verify the value for `day` is indeed an array before trying to do `implode()` on that array.

```
$day_string = '';
if(!empty($_POST['day']) && is_array($_POST['day'])) {
    $day_string = implode(',', $day);
} else {
    // you didn't get at least one day checked, so issue error in this code block
}

```

If this same code is run for both GET and POST, then you might need to check that this is a POST (as `else if` or before even entering this block of code) such that you don;t get an error shown for GET requests.

As a matter of practice you should ALWAYS check for the existence of and validate expected format/values of any user-provided input before working with it in your code. Get yourself familiar with `isset()`, `empty()`, `filter_var()`, `is_array()` and similar functions.
If I'm understanding you well, you want to get some form of statistics about when do your visitors hit your website. Isn't it easier if you slide a hidden input like this?:

```
<input type="hidden" name="day" value="<?php print strtolower(date("l")); ?>">

```

That way, you would get what you want without your users having to click anything. On monday, this would look like `<input type="hidden" name="day" value="monday">` and so on.

Hope that helps :P