Jump to content

Wrong delete


alphasil

Recommended Posts

Hi 

I have this function in php file 

function verAtividadesDocente()
	{
	 if(!$this->DBLogin())
        {
            $this->HandleError("Erro na ligação à Base de Dados!");
            return false;
        }
		$image = 
		$iduser = $this->UserId();
		$nresult = mysql_query("SELECT t1.idatividade, t1.atividade, t1.data, t1.hora, t1.local,t2.nome FROM atividades t1, utilizador t2 WHERE t2.idutilizador = '$iduser'", $this->connection) or die(mysql_error());
        $num_rows = mysql_num_rows($nresult);
		echo "<table>";
		echo "<tr>
		<td>Nome</td>
		<td>Data</td>
		<td>Hora</td>
		<td>Local</td>
		<td>Intervenientes</td>
		<td>Operações</td>
		</tr>";
		while($row = mysql_fetch_assoc($nresult)) {
		echo "<tr>";
		$id = $row['idatividade'];
		echo "<td>".$row['atividade']."</td>";
		echo "<td>".$row['data']."</td>";
		echo "<td>".$row['hora']."</td>";
		echo "<td>".$row['local']."</td>";
		echo "<td>".$row['nome']."</td>";
		echo "<td>".'<a href="editaAtividade.php?id=',$id,'"><img src="images/tick.png"></a>'.' / '.'<a href="' . $this->removerAtividade($id) . '";><img src="images/delete.png"></a>'."</td>";
		echo "</tr>";
		}
        echo "</table>";			
	}

and my problem is this line

echo "<td>".'<a href="editaAtividade.php?id=',$id,'"><img src="images/tick.png"></a>'.' / '.'<a href="' . $this->removerAtividade($id) . '";><img src="images/delete.png"></a>'."</td>";

I have two link with images, but when i load the page i have my database record, if i use refresh the record disapear without using any of those buttons....why?

 

thanks for any help

Link to comment
https://forums.phpfreaks.com/topic/292754-wrong-delete/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.