chevys Posted December 2, 2009 Share Posted December 2, 2009 I have listed below the script I am having issues with. The form loads within the facebox but when I submit the form I need it to display the results within the Facebox also. Thanks in advance! <?php include "globals1.php"; $_GET['ID'] = abs((int) $_GET['ID']); $id=$db->query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1"); if($db->num_rows($id)==0) { print "Invalid item ID"; $h->endpage(); exit; } else { $r=$db->fetch_row($id); } if(!$r['armor']) { print "This item cannot be equipped to this slot."; $h->endpage(); exit; } if($_GET['type']) { if(!in_array($_GET['type'], array("equip_armor"))) { print "This slot ID is not valid."; $h->endpage(); exit; } if($ir[$_GET['type']]) { item_add($userid, $ir[$_GET['type']], 1); } item_remove($userid, $r['itmid'], 1); $db->query("UPDATE users SET {$_GET['type']} = {$r['itmid']} WHERE userid={$userid}"); print "Item {$r['itmname']} equipped successfully.";'); <-------This is what I need it to print in the FaceBox } else { print "<h3>Equip Armor</h3><hr /> <form method='get' id='pokeform' name='pokeform' action='equip_armor.php'> <input type='hidden' name='ID' id='poke_1' value=''{$_GET['ID']}'' /> Click Equip Armor to equip {$r['itmname']} as your armor, if you currently have any armor equipped it will be removed back to your inventory.<br /> <input type='hidden' name='type' value='equip_armor' onClick='ajaxpost('')' /></form>"; } $h->endpage(); ?> Link to comment https://forums.phpfreaks.com/topic/183784-facebox-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.