Mshop Delete Function

Started on the old forum in January 2009 · view the original in the archive · old links redirect here

2 replies · 475 views · started 17 years ago · 1 min read

2 participants
nclemale36 Lead · 537 posts #1
else if($action=="delete")
{
  $id = $_GET["id"];
  
      echo "<head>";
      echo "<title>Shop Tools</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
  echo "<p align=\"center\">";
  
  $res = mysql_query("DELETE FROM ibwf_shop WHERE id='".$id."'");
  if($res)
          {
            mysql_query("DELETE FROM ibwf_shop WHERE id='".$id."'");
            
            echo "<img src=\"../phpThumb/phpThumb.php?src=../images/ok.gif\" alt=\"O\"/>item deleted";
          }else{
            echo "<img src=\"../phpThumb/phpThumb.php?src=../images/notok.gif\" alt=\"X\"/>Database Error";
          }
  echo "

";
  

      
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p></body>";
}

can anyone help me . created a delete item link under the buy item link in mshop . this is for owners only .

but i am getting database Error .

what have i missed .

thanks

nclemale36 Lead · 537 posts #2

QUOTE (nclemale36 @ Jan 13 2009, 11:09 PM) <{POST_SNAPBACK}>

else if($action=="delete")
{
  $id = $_GET["id"];
  
      echo "<head>";
      echo "<title>Shop Tools</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
  echo "<p align=\"center\">";
  
  $res = mysql_query("DELETE FROM ibwf_shop WHERE id='".$id."'");
  if($res)
          {
            mysql_query("DELETE FROM ibwf_shop WHERE id='".$id."'");
            
            echo "<img src=\"../phpThumb/phpThumb.php?src=../images/ok.gif\" alt=\"O\"/>item deleted";
          }else{
            echo "<img src=\"../phpThumb/phpThumb.php?src=../images/notok.gif\" alt=\"X\"/>Database Error";
          }
  echo "

";
  

      
  echo "0 <a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p></body>";
}

can anyone help me . created a delete item link under the buy item link in mshop . this is for owners only .

but i am getting database Error .

what have i missed .

thanks

its ok i fixed it . lol

djdevil89 Senior · 287 posts #3

QUOTE (nclemale36 @ Jan 13 2009, 10:22 PM) <{POST_SNAPBACK}>

its ok i fixed it . lol

Topic closed then

foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close