boionfire81 Posted April 9, 2016 Posted April 9, 2016 So I found richard's business mod update (looks awesome by the way). But this one line is giving me issues. echo '<p class="heading">Create Company</p>'; $_POST['name'] = mysql_real_escape_string($_POST['name']); $_POST['class'] = abs(@intval($_POST['class'])); Basically, Im using mysqli, but switching to mysqli_real_escape_string returns a fatal also. Will post the exact error in a minute after I can login. >.< Quote
Zettieee Posted April 9, 2016 Posted April 9, 2016 Change "mysql_real_escape_string" to "$db->escape" Remove @ from (@intval. numbers should never error Quote
boionfire81 Posted April 10, 2016 Author Posted April 10, 2016 quick question. Last one for the day. With http://makewebgames.io/forum/game-engines/mccode-development-support/free-modifications/16465-richards-business-mod-fixed-with-a-few-things-added using the business mod, is going to help make my game more dynamic. Instead of just passive bonuses or items, there will be areas that are open just to certain company employees. ie. law firm member who has been employed for more than 3 days will be able to access the bail feature for the jail. Allowing only lawyers to be able to bail people out. So what details do I call? what should the if statement look like? I can figure the rest out from there. But defines are almost always unclear for me, and if statements semi. Quote
KyleMassacre Posted April 11, 2016 Posted April 11, 2016 define defines a constant: define('SOME_CONSTANT',3); echo SOME_CONSTANT; // returns 3 And comparison functions/statements are crucial to programming. You will need to know this stuff in order to be effective. if($something == $somethingElse) { echo "true"; } else { echo "false"; } Quote
boionfire81 Posted April 11, 2016 Author Posted April 11, 2016 eh I said I wasn't posting anymore tonight, lol. so ok, I need to call bmembBusiness = 4 & bmembDays => 3 from businesses_members then echo so what should I do? How do I form that? Quote
KyleMassacre Posted April 11, 2016 Posted April 11, 2016 The only way I can show you is in pseudo code which is what I already showed you above Quote
boionfire81 Posted April 11, 2016 Author Posted April 11, 2016 ok, my thing is combing the two factors. I have two variables that need to be true, not just one. Quote
boionfire81 Posted April 11, 2016 Author Posted April 11, 2016 so define('jobtype',$db->query("SELECT `bmembBusiness` FROM `businesses_members` WHERE `bmembBusinness` = 4")); define('jobdays',$db->query("SELECT `bmembDays` FROM `businesses_members` WHERE `bmembbDays` > 2")); if ($jobtype = TRUE & $jobdays = TRUE) { echo " etc. 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.