View Single Post
  #13  
Old 07-10-2014, 05:48 PM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 67,783
Hwona is on a distinguished road
Default

Ok, I tested out this code:
PHP Code:
function items_trinket($item$adopt){
  
$mysidia Registry::get("mysidia");
$slot1 $this->adopt->getAdoptSlot1();
$slot2 $this->adopt->getAdoptSlot2();
$slot3 $this->adopt->getAdoptSlot3();
$slot4 $this->adopt->getAdoptSlot4();
$slot5 $this->adopt->getAdoptSlot5();
$message ="<input type=’radio’ name=’slot[]’ value=’slot1’ /><span class=’slot’><img src='{$mysidia->path->getAbsolute()}picuploads/trinkets/{$slot1}.png'></span><br>
<input type='radio’ name=’slot[]’ value=’slot2’ /><span class=’slot’><span class=’slot’><img src='
{$mysidia->path->getAbsolute()}picuploads/trinkets/{$slot2}.png'></span><br>
<input type='radio’ name=’slot[]’ value=’slot3’ /><span class=’slot’><img src='
{$mysidia->path->getAbsolute()}picuploads/trinkets/{$slot3}.png'></span><br>
<input type='radio’ name=’slot[]’ value=’slot4’ /><span class=’slot’><img src='
{$mysidia->path->getAbsolute()}picuploads/trinkets/{$slot4}.png'></span><br>
<input type='radio’ name=’slot[]’ value=’slot5’ /><span class=’slot’><img src='
{$mysidia->path->getAbsolute()}picuploads/trinkets/{$slot5}.png'></span><br>
<input type='submit’ name=’choose’ value=’Give Trinket to Adoptable’ />"
;
$document->add(new Comment($message));
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('{$slot}' => '{$image}'), "aid ='{$adopt->aid}' and owner='{$item->owner}'");
  
$delitem $item->remove(); 
  return 
$note;

and got this error on a blank page when I tried to use the item:
Parse error: syntax error, unexpected end of file in /home/wallie12/public_html/functions/functions_items.php on line 391
I'm pretty certain the code above is the issue, but I don't know what's wrong. :L
__________________
Reply With Quote