Already tried that utexas_pjm - doesn't do a thing .
I know you really need the actual code, but what I'm working on is closed source currently...
I'll show you as much as I can
attack.php
<?php
...
require ($atw->getClassDirectory().'Fighting.class.php');
require ($atw->getClassDirectory().'Users.class.php');
...
$Fighting = new Fighting();
$Users = new Users();
...
if ($_POST['attack'])
{
$attackerData = $psuedo;
$defenderData = $psuedo;
$turns = $psuedo;
$return = $Fighting->attackPlayer($attackerData,$defenderData,$turns);
}
?>
Fighting.class.php
<?php
class Fighting{
// constructor
function Fighting(){}
...
function attackPlayer($attackerData,$defenderData,$turns)
{
...
$Users::updateUser($attackerData['userID'], "updatedata=here");
$Users::updateUser($defenderData['userID'], "updatedata=here");
return true;
}
?>
Users.class.php
<?php
class Users {
// constructor
function Users(){ }
...
function updateUser($id, $data)
{
//Update code here
}
?>
Also, I'm not really a big O.O.P. buff (obviously). That link Daniel0 posted makes me think the second class (Users) has to be defined as a child class? I hope not, because I still want to be able to call it without calling Fighting...
Thanks guys,
/Whitey