Mshop Delete Function

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mshop Delete Function

    Code:
    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=&#39;".$id."&#39;");
      if($res)
              {
                mysql_query("DELETE FROM ibwf_shop WHERE id=&#39;".$id."&#39;");
                
                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&amp;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
    Wapchat4u


    Topsites4u

    #2
    <div class='quotetop'>QUOTE (nclemale36 @ Jan 13 2009, 11:09 PM) <{POST_SNAPBACK}></div>
    Code:
    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=&#39;".$id."&#39;");
      if($res)
              {
                mysql_query("DELETE FROM ibwf_shop WHERE id=&#39;".$id."&#39;");
                
                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&amp;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[/b]
    its ok i fixed it . lol
    Wapchat4u


    Topsites4u

    Comment


      #3
      <div class='quotetop'>QUOTE (nclemale36 @ Jan 13 2009, 10:22 PM) <{POST_SNAPBACK}></div>
      its ok i fixed it . lol[/b]
      Topic closed then

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

      Comment

      Working...
      X