Hi all . I got a few checkboxes in page with a drop down box. I want post the value of checkbox to the same page and insert them in to database. could any one tell me how to grab those values from within the same page?(As you see my form is posting to same page)
PHP Code:<script type="text/javascript">
function doAction(action)
{
var e = document.createElement('input');
e.setAttribute('type', 'hidden');
e.setAttribute('name', action);
e.setAttribute('value', "1");
document.listform.appendChild(e);
document.listform.submit();
}
function setCopyDst(copy_dst)
{
var e = document.createElement('input');
e.setAttribute('type', 'hidden');
e.setAttribute('name', "copy_dst");
e.setAttribute('value', copy_dst);
document.listform.appendChild(e);
}
function selectCopy(list)
{
var index = list.selectedIndex;
var value = list.options[index].value;
setCopyDst(value);
doAction("action_copy");
}
</script>
<form method="post" name="listform">
<span class="xxlargeText"><b>|</b></span> Copy Videos To:
<select name="copy_to" onChange="selectCopy(this)">
<option selected>- - - - - - - - -</option>
<?php echo $option; ?>
</select> </p>
......
......
<input type="checkbox" id="<?php echo $row["id"] ?>" name="selected_id" value="<?php echo $row["idvalue"] ?>">




Reply With Quote