boionfire81 Posted April 9, 2016 Share 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 Link to comment Share on other sites More sharing options...
Zettieee Posted April 9, 2016 Share Posted April 9, 2016 Change "mysql_real_escape_string" to "$db->escape" Remove @ from (@intval. numbers should never error Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 9, 2016 Author Share Posted April 9, 2016 Thanks. That worked :) Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 10, 2016 Author Share 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 Link to comment Share on other sites More sharing options...
KyleMassacre Posted April 11, 2016 Share 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 Link to comment Share on other sites More sharing options...
boionfire81 Posted April 11, 2016 Author Share 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 Link to comment Share on other sites More sharing options...
KyleMassacre Posted April 11, 2016 Share Posted April 11, 2016 The only way I can show you is in pseudo code which is what I already showed you above Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 11, 2016 Author Share 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 Link to comment Share on other sites More sharing options...
boionfire81 Posted April 11, 2016 Author Share 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 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.