Mafia-Club Posted February 27, 2009 Posted February 27, 2009 Hey guys heres my first mod i have ever made and i am very happy with this mod has it is my first :) Btw Does AnyOne want to secure it for me Has it is'nt Secured I will Learn On How to Secure soon too :) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Dayo Posted February 27, 2009 Posted February 27, 2009 Re: Food Shop [Mccode V2] 404! The page you were looking for is not available. my1.php?action=buy is the file spose to be called my1.php? EDIT: just changed file name, worked gr8 :D +1 Quote
Mafia-Club Posted February 27, 2009 Author Posted February 27, 2009 Re: Food Shop [Mccode V2] Ah no Change the file Name To anythink then you got to change the links to the file name you changed it to so like file.php?action=buy and so on Quote
Dayo Posted February 27, 2009 Posted February 27, 2009 Re: Food Shop [Mccode V2] also 1, 2 n 7 are a bit cheap im gona change it to 10 20 n 70 Quote
Mafia-Club Posted February 27, 2009 Author Posted February 27, 2009 Re: Food Shop [Mccode V2] ok np mate Quote
Dayo Posted February 27, 2009 Posted February 27, 2009 Re: Food Shop [Mccode V2] you forgot the db query to take the cash away when u buy a burger here is it fixed You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. btw prices are 10x more Quote
Karlos Posted February 27, 2009 Posted February 27, 2009 Re: Food Shop [Mccode V2] is the file spose to be called my1.php? Maybe $_SERVER['PHP_SELF'] would be sufficient :wink: Quote
Mafia-Club Posted February 27, 2009 Author Posted February 27, 2009 Re: Food Shop [Mccode V2] so guys what you think of this mod my first Quote
yaz123 Posted February 27, 2009 Posted February 27, 2009 Re: Food Shop [Mccode V2] You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Hey!! You nicked my idea :P, its cool I'm going to make a version where theirs pics and stuff but here's a update on your security ;) Quote
Mafia-Club Posted February 27, 2009 Author Posted February 27, 2009 Re: Food Shop [Mccode V2] You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Hey!! You nicked my idea :P, its cool I'm going to make a version where theirs pics and stuff but here's a update on your security ;) Thanks Atleast Am getting somewhere in php Quote
Dayo Posted February 27, 2009 Posted February 27, 2009 Re: Food Shop [Mccode V2] yaz you forgot the db query from when you buy the burger (it dont take cash away) i fixed it above Quote
Karlos Posted February 27, 2009 Posted February 27, 2009 Re: Food Shop [Mccode V2] Yea... Hmm.. Great... Try doing it all.. Quote
Mafia-Club Posted February 27, 2009 Author Posted February 27, 2009 Re: Food Shop [Mccode V2] $db->query("UPDATE users SET money=money-10 WHERE userid=$userid"): Thats the Query so when you buy a burger it takes the money out Quote
POG1 Posted February 27, 2009 Posted February 27, 2009 Re: Food Shop [Mccode V2] @ yaz. How is that secure? all you did was add sprintf lol Quote
yaz123 Posted February 27, 2009 Posted February 27, 2009 Re: Food Shop [Mccode V2] $db->query("UPDATE users SET money=money-10 WHERE userid=$userid"): Thats the Query so when you buy a burger it takes the money out In sprintf(); form You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Karlos Posted February 27, 2009 Posted February 27, 2009 Re: Food Shop [Mccode V2] Here's a base for you.. functions "bur" and "pizza" have not been touched... Hopefully it shows you a better use of sprintf() and neater code. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
POG1 Posted February 28, 2009 Posted February 28, 2009 Re: Food Shop [Mccode V2] Try to name the links more appropriate, so something like burger, chips, pizza. Also, why does everyone use functions with the switch? You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Mafia-Club Posted February 28, 2009 Author Posted February 28, 2009 Re: Food Shop [Mccode V2] If you Want To test and to see how it looks then go to http://midnight-dealers.com/my1.php :) you got to login first so register Quote
avguste Posted March 2, 2009 Posted March 2, 2009 Re: Food Shop [Mccode V2] Looks good Do you mind if I remove the "made by Mafia-Club". Quote
Mafia-Club Posted March 2, 2009 Author Posted March 2, 2009 Re: Food Shop [Mccode V2] Thanks No i Dont Mind You Can Take It Of :) Quote
avguste Posted March 3, 2009 Posted March 3, 2009 Re: Food Shop [Mccode V2] Thank you Could you please indicate where do I need to edit to change the prices? Thanks Quote
Mafia-Club Posted March 3, 2009 Author Posted March 3, 2009 Re: Food Shop [Mccode V2] Hey to change the price look for if($ir['money'] > 2 ) { echo "You Bought A Potion Of Chips Enjoy"; $db->query("UPDATE users SET money=money-5 WHERE userid=$userid"); Change the 2 To the price you want it to be on if($ir['money'] > 2) then change the sql query where it sayes money=money- so when you buy it how much mnoey it should take out from the user Quote
avguste Posted March 3, 2009 Posted March 3, 2009 Re: Food Shop [Mccode V2] seems to be working. Thanks Quote
Mafia-Club Posted March 3, 2009 Author Posted March 3, 2009 Re: Food Shop [Mccode V2] No Problem 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.