Jump to content
Fórum Script Brasil
  • 0

(Resolvido) deletar anuncio.


yamaguchi

Question

Olá amigo, boa tarde!!

Estou com um script para deletar anúncios do meu site, porém qualquer membro pode deletar qualquer anúncio. Gostaria que alguém me ajude para o usuário pode deletar apenas seus anúncios. Tipo, colocar apenas para o id do usuários que estiver logado poder deletar.

estoquedelete.php

<?php

$id = $_GET['id'];

if(empty($_GET['id']))?>

<? include "Connections/repasses.php"; ?>

<?

$cn=mysql_connect("$hostname_repasses", "$username_repasses", "$password_repasses");

mysql_select_db("$database_repasses");

?>

<?

$sql="DELETE FROM `hiperauto`.`estoque` WHERE `estoque`.`Id_estoque` = $id LIMIT 1;'";

$deleta=mysql_query($sql);

echo "Deltado com sucesso!! Id: <b>$id</b>";

?>

Alguém pode me ajudar? Vlw!!!

Link to post
Share on other sites

6 answers to this question

Recommended Posts

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

Cloud Computing


  • Forum Statistics

    • Total Topics
      149287
    • Total Posts
      645678
×
×
  • Create New...