arcadeicons
Member
I'm trying to run this PHP script during onLoad of my form to check if the person accessing the form has the rights to actually use it to submit a score.
Neither the var_dump or the print statements show any output on the page so I don't know if the script is performing the check properly, what am I missing here?
Code:
$jinput = JFactory::getApplication()->input;
$tournID = JRequest::getVar('tournID');
$user = JFactory::getUser();
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
->select('*')
->from('add_tournament_199_repeat')
->where('parent_id') . ' = ' . $tournID
->where('add_remove_score_keepers') . ' = ' . {$user->id};
var_dump((string) $myQuery);
$myDb->setQuery($myQuery);
$result = $myDb->loadObjectList();
if ($result = "0") {
print ("Hey you are not a judge for this tournament");
} else {
print ("Looks like you are a judge");
}
exit;
Neither the var_dump or the print statements show any output on the page so I don't know if the script is performing the check properly, what am I missing here?
Last edited: