boionfire81 Posted March 31, 2016 Posted March 31, 2016 no, I can't that I am. But I tend to try to trust people when they post a mod. So how should I go about this? Quote
KyleMassacre Posted March 31, 2016 Posted March 31, 2016 Ok, thats fine. The difference between GET and POST is that they are 2 different HTTP methods and to put it as simple as possible, they get their data from 2 different locations. POST gets its data generally from a form, I believe you have seen things along the lines of: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And the key names for your POST variables come from the name of your inputs: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. From there you are able to use $_POST['username']. You are able to use any HTTP method inside your form but usually you use post and not get because thats just dumb :p. You can learn more by google what CRUD is (Create, Read, Update, Delete). For GET, it gets the data from the URL (which is why I asked what your URL looked like before) which is called a query string. So for example: index.php?action=someAction&type=someType So now you have access to $_GET['action'] and $_GET['type']: $_GET['action'] = someAction $_GET['type'] = someType So hopefully this helps you debug your problem a bit more Quote
boionfire81 Posted March 31, 2016 Posted March 31, 2016 Ok, so try adding the itmtype to the url? Quote
boionfire81 Posted March 31, 2016 Posted March 31, 2016 Added an automatic weid=15 to the link so it looks like ammunition.php?weid=15&ID=80 And still get error "This is not a gun." Also added a GET weid to the top with the others and still no go. Quote
boionfire81 Posted April 1, 2016 Posted April 1, 2016 ammunition.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Buy Ammo You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
KyleMassacre Posted April 1, 2016 Posted April 1, 2016 The first thing we are going to is try: Replace this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. with this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And report back what it says Quote
boionfire81 Posted April 1, 2016 Posted April 1, 2016 Sorry, internet has been down most of the day. A critical error has occurred, and page execution has stopped. Below are the details: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND i.itmtype=15 AND iv.inv_userid=1' at line 1 Action taken: Attempted to execute query: SELECT iv.*,i.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid WHERE i.itmid= AND i.itmtype=15 AND iv.inv_userid=1 Quote
KyleMassacre Posted April 2, 2016 Posted April 2, 2016 Ok change the $_POST['ID'] to $_GET['ID'] and anywhere you see $_GET['id'] to $_GET['ID'] anywhere you see in the file Quote
boionfire81 Posted April 2, 2016 Posted April 2, 2016 This item is not a Gun! Exit SELECT iv.*,i.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid WHERE i.itmid=133 AND i.itmtype=15 AND iv.inv_userid=1 Quote
KyleMassacre Posted April 2, 2016 Posted April 2, 2016 Run that query in your PHPMyAdmin and see what shows up. Quote
boionfire81 Posted April 2, 2016 Posted April 2, 2016 came back green but MySQL returned an empty result set (i.e. zero rows). (Query took 0.0016 sec) Quote
KyleMassacre Posted April 2, 2016 Posted April 2, 2016 Then your items are not set up correctly Quote
KyleMassacre Posted April 2, 2016 Posted April 2, 2016 Try running the same query without the i.itmid=133 AND Quote
boionfire81 Posted April 3, 2016 Posted April 3, 2016 Returned one result [ATTACH=CONFIG]n376180[/ATTACH] Quote
boionfire81 Posted April 5, 2016 Posted April 5, 2016 I've managed to be able to successfully process the itm to allow to see the purchase form, but after entering a clip number it again returns this item is not a gun rather than updating the database with clips. Here is the code so far You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
boionfire81 Posted April 10, 2016 Posted April 10, 2016 If there is anyone who can get this working for me, message me your price. Quote
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.