WarMad Posted May 22, 2016 Share Posted May 22, 2016 (edited) This is my first complete mod in a VERY long time i just started making games again if you want anything added or would like to add something feel free to do so run this in phpmyadmin You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. you will also have to add job and jobpay int 11 into the users table make a file called jobs.php and add this code You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then add this in cron_day.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. please give me your feedback let me know what you think about it im just learning how to secure things so please give me some info on that as well thank you Edited May 22, 2016 by WarMad Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 22, 2016 Share Posted May 22, 2016 Some things to note: I would suggest reading up on PSR: http://www.php-fig.org/psr/psr-2/: Use proper indentation, curly braces on the same line as your control statements i.e: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. PSR 2 helps improve readability If your going to use *sprintf then use it You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. To: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I would also remove all your connection variables from your $sql* variables and place them in your actual mysql_query() calls. Other than that stuff, not too bad Quote Link to comment Share on other sites More sharing options...
WarMad Posted May 22, 2016 Author Share Posted May 22, 2016 ok thanks for the feedback i updated the sprintf but for You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. i dont really understand i get confused seeing it and reading it on that site is there any chance you can be bothered enough to take part of my code and give me an example that way so i can understand a little better if your not up to it its ok thank you for the help you have already given Quote Link to comment Share on other sites More sharing options...
WarMad Posted May 22, 2016 Author Share Posted May 22, 2016 and if your up for it can you show me an example of removing all my connection variables from my $sql* variables and place them in my actual mysql_query() calls with just 1 example sorry i keep bothering i really want to learn haha Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 22, 2016 Share Posted May 22, 2016 Just read the link that I supplied that's basically what it's talking about. It just has to do with your code formatting Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 22, 2016 Share Posted May 22, 2016 Take the $c variables out of your sprintf() functions and put them in your mysql_query() like: $qry = mysql_query($sql, $c); Quote Link to comment Share on other sites More sharing options...
WarMad Posted May 22, 2016 Author Share Posted May 22, 2016 Ok thanks again Kyle I will update the code later Quote Link to comment Share on other sites More sharing options...
WarMad Posted May 22, 2016 Author Share Posted May 22, 2016 ok i gave it another shot let me know how it is Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 23, 2016 Share Posted May 23, 2016 Your cron still has the connection variable in the sprintf(), your fomatting is still non-existent and also you don't need to sprintf() every query; unless you are actually formatting it, which some of them you don't need. It's just adding a tiny bit extra processing where it's not needed. Me personally, I do not like to use that function to format my queries and I would rather use prepared statements for that but unfortunately for you, you don't have the luxury. I would more than likely use it for output on a string of something: 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...
WarMad Posted May 23, 2016 Author Share Posted May 23, 2016 Ya I didn't do anything with that I forgot about it and ok I will play with that tomorrow and see what I can come up with Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted May 26, 2016 Share Posted May 26, 2016 Ugh.. Genuine stomach churns whilst writing this - friggin' mysql_*() bleh.. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And cron becomes: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 1 Quote Link to comment Share on other sites More sharing options...
WarMad Posted May 26, 2016 Author Share Posted May 26, 2016 Wow nice thanks 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.