Do it:
index.php(for example):
<form action="page_with_previews.php" id="form_preview" method="post" >
<?php
// there render list
?>
</form>
<a id="preview" >Preview</a>
// by jQuery
<script>
$("#preview").click(function(){
e.preventDefault();
var cnt = $("#form_preview input[type=checkbox]:checked").size();
if ( count > 0 )
$("#form_preview").submit();
});
</script>
page_with_previews.php(for example):
if ( isset($_POST['checkbox']) {
foreach (array_filter($_POST['checkbox']) as $item) {
echo $item;
}
}
EDIT Without JS-scripts
index.php(for example):
<?php
if (strtolower($_SERVER["REQUEST_METHOD"]) == "post"){
if ( isset ($_POST['checkbox']) ){
$url_data = http_build_query($_POST['checkbox']);
header('Location:page_with_previews.php?'.$url_data);
die;
}
}
?>
<form action="" id="form_preview" method="post" >
<?php
// there render list
?>
<input type="submit" value="View previews"/>
</form>
page_with_previews.php(for example):
if ( isset($_GET['checkbox']) {
foreach ($_GET['checkbox'] as $item) {
echo $item;
}
}