View Single Post
  #10  
Old 07-04-2014, 02:53 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,582
IntoRain is on a distinguished road
Default

A function runs as many times as you call it. Even if you return from it, if you call it again it will return again. The problem is the

return $message;

In the middle. At that moment, the function will quit and the rest of code inside that function won't run at all. This part is like it doesn't exist:



PHP Code:
if (!isset($_POST[‘slot’])) { 
$noslot = “You have not selected a slot to place this trinket in.” 
return $noslot

else { 
$slot $_POST[‘slot’]; 
$image $item->itemname
$note "The trinket has been given to this adoptable!"
  
$mysidia->db->update("owned_adoptables", array("lastbred" => 0), "aid ='{$adopt->aid}' and owner='{$item->owner}'"); 
  
$delitem $item->remove();  
  return 
$note

__________________


asp.net stole my soul.
Reply With Quote