
wmendes
(usa Ubuntu)
Enviado em 06/09/2013 - 11:07h
Bom dia!
tenho o seguinte cod php.
<?php
//error_reporting(0);
include("conexao.php");
function organograma($idtarefapai = 0){
$query = mysql_query("SELECT * FROM pro_tarefa WHERE idtarefapai = " . $idtarefapai) or die(erro_mysql());
if(mysql_num_rows($query) > 0){
echo "<ul id='org' style='display:none'>";
while($row = mysql_fetch_array($query)){
$idtarefa = stripslashes($row['idtarefa']);
$tarefa = stripslashes($row['tarefa']);
?>
<li>
<?php echo $tarefa?><?php organograma($idtarefa)?>
</li>
<?php }echo '</ul>';}}?>
<?php organograma();?>
</div>
seguinte, como eu pego o valor do id no bd dessa <li> ao clicar nela?
estou tentando assim só que estou digitando os valores das variáveis >>>
var order = $(this).sortable("serialize");
var idtarefa = 7;
var idtarefapai = 3;
$.post("update2.php?update=update&idtarefa="+idtarefa+"&idtarefapai="+idtarefapai+"", order, function(theResponse){
$("#teste2").html(theResponse);
});
Alguém me da uma luz!