rulerofzu Posted October 4, 2012 Share Posted October 4, 2012 Post what you have tried. Quote Link to comment Share on other sites More sharing options...
Melkrow Posted October 4, 2012 Share Posted October 4, 2012 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. A critical error has occurred, and this page cannot be displayed. Please try again later. Query failed Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted October 4, 2012 Share Posted October 4, 2012 `effect3` = "' . $efx3 . $_POST['itmpic'] Is wrong. Look at the syntax of how the other columns are set in the query. , `itmpic` = '. $itmpic .', `weapon` = ...... *changed $_POST['itmpic'] to $itempic as you still shouldnt be using $_POST directly in queries :P Quote Link to comment Share on other sites More sharing options...
Melkrow Posted October 4, 2012 Share Posted October 4, 2012 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Like that? (I tried a lot more ways lol) When I put it like that, I don't get the error on edits as long as I don't put anything in the item image box, and as soon as I type anything in the pic box I get that same query error. My question is...how does the script know what $itmpic is? Can that be defined somewhere separately? I looked through the document and saw that other elements (like $armor, $weapon, $itmdesc etc etc) were defined few hundred lines above the query, like this. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I tried to do my own version of $itmpic = ..... lol, didn't quite work out. Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted October 4, 2012 Share Posted October 4, 2012 Look at the proceeding form where you have the input fields. So you have a new one for entering the details for the item pic which then when the form is submitted gives the info for the query. So then you also need to add the new var for the query $itmpic = (isset($_POST['itmpic'])) ? strip_tags($db->escape($_POST['itmpic'])) : ''; Quote Link to comment Share on other sites More sharing options...
realmoflegends Posted October 4, 2012 Share Posted October 4, 2012 In my game to do this, I ended up taking an simple, direct path to doing this. In iteminfo.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. The last line displays the pic associated with the item, and I just upload the pic with the exact item name on it, and it works. Quote Link to comment Share on other sites More sharing options...
Melkrow Posted October 4, 2012 Share Posted October 4, 2012 Look at the proceeding form where you have the input fields. So you have a new one for entering the details for the item pic which then when the form is submitted gives the info for the query. So then you also need to add the new var for the query $itmpic = (isset($_POST['itmpic'])) ? strip_tags($db->escape($_POST['itmpic'])) : ''; I tried that before, and tried it just now again, gives me query error. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Melkrow Posted October 4, 2012 Share Posted October 4, 2012 (edited) To add to edit item... Must have already done the first part of this mod Open staff_items.php Find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Can somebody please do this part for me? This is the "edit" part of the PHP file. What exactly do I find and replace .... :( (Stupid Redux version) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Edited October 4, 2012 by Melkrow Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.