Im trying to make a form , because im showing some table rows and i need a checkbox to delete them. The problem is that the $_POST is empty all the time and i ran out of ideas. I checked the code 100 times and it looks ok for me. Can you please give me a hand.
[CODE] print ‘<form name=”formmsg” id=”formmsg” method=”post” action=”http://apps.facebook.com/********/read.php?delete=selected’;if($_GET[‘pageno’]){echo ‘&pageno=’.$_GET[‘pageno’];}
print ‘” target=”_top”>’;
print ‘<table id=”tablamensajes” class=”tabla”><tr><td><div class=”cabezerabox”> </div></td><td style=”width:100px”><div class=”cabezerabox”>Received</div></td><td style=”width:400px”><div class=”cabezerabox”>Mensaje</div></td><td><div class=”cabezerabox”>Sender</div></td></tr>’;
$id=0;
for ($i=0; $i< count($mensa); $i++){
$resumen=ucfirst(strtolower(substr($mensa[$i][‘mensaje’],0,70)));
$id=$id+1;
print ‘<tr ><td class=”check”><input type=”checkbox” name=”chkIdMsg[‘.$i.’]” value=”‘. $mensa[$i][‘idMsg’] . ‘”></td><td class=”mensajes”>’. $mensa[$i][‘fecha’] . ‘</td><td id=”‘.$id .'” class=”filas” onclick=”mostrarOcultar(this)”><a href=”#” onclick=”function(); return false;”>’. $resumen . ‘…</a></td><td class=”mensajes”><a href=”#” onclick=”function(); return false;”><img src=”images/who.png” height=”30px” width=”30px”></img></a></td></tr>’;
$id=$id+1;
print ‘<tr id=”‘.$id .'” class=”filasocultas”><td colspan=”4″ class=”mensajeentero”>’. nl2br($mensa[$i][‘mensaje’]). ‘</td></tr>’;
}
print ‘<tr><td colspan=”4″> <img src=”images/arrow.png”></img> <a href=”#” onclick=”marcarTodos()”>Select All /Unselect All</a> <a href=”#” onclick=”document.formmsg.submit();”><img src=”images/drop.png”>Delete Selected</img></a><input type=”text” name=”text” value=”testtext”><input type=”submit” value=”testsubmit”></td><tr>’;
print ‘</table></form>’;
}
if($_GET[‘delete’]== ‘selected’){
var_dump($_POST);
print $_POST[‘text’];
print $text;