View Single Post
  #3  
Old 05-14-2012, 06:36 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 116,193
SilverDragonTears is on a distinguished road
Default

The problem is in this code not the above code:
Code:
elseif (isset($_POST['deltab'])) {
$name = $_POST['name'];
$query = "SELECT * FROM ".constant("PREFIX")."tabs WHERE username='".$loggedinname."' AND name='".$name."'";
		$stmt = $adopts->query($query);
$num = $stmt->fetch(PDO::FETCH_ASSOC);

if($num == 0){
$article_content='This cage does not exist.';
}else{


$adopts->update("owned_adoptables", array("tab" => ''), "owner='{$loggedinname}' and tab='{$name}'");
$adopts->delete("tabs", array(), "username='{$loggedinname}' and name='{$name}'");
$article_content='You successfully deleted the tab. Your hamster was automatically moved to your default cage at the <a href="myadopts.php">My Hamsters</a> page.';
}
__________________

Check out SilvaTales
Reply With Quote