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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.