I have the following codes:
<form method="post">
<input type="checkbox" name="fruit[]" value="apple" id="apple" /><label for="apple">Apple</label><br />
<input type="checkbox" name="fruit[]" value="pinapple" id="pinapple" /><label for="pinapple">Pinapple</label><br />
<input type="checkbox" name="fruit[]" value="grapefruit" id="grapefruit" /><label for="grapefruit">Grapefruit</label><br />
<input type="submit" name="go" />
</form>
<?php
$fruitList = implode(', ', $_POST['fruit']);
echo $fruitList;
?>
It will show the checked items after submit. Is this possible show the ticked items values inside a input box before submitting.