In the ask.tpl file, I want to change the name and email fields to read the username and email address from the other program.
I'm guessing I need something like
require_once('./learningcentre/config.php');
global $CFG, $USER;
and then change the ask.tpl file with something like
<div class="row"><span class="label">{msgNewContentMail}</span>
<input type="hidden" name="email" value="<?php echo $USER->email;?>" />
<?php echo $USER->email; ?></div>
but I'm not sure where to put it
I've tried adding
require_once('./learningcentre/config.php');
global $CFG, $USER;
to the ask.php file, but it just says
Warning: main(./learningcentre/config.php): failed to open stream: No such file or directory in /home/baillie/public_html/myfaq/ask.php on line 3
Fatal error: main(): Failed opening required './learningcentre/config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/cpanel/3rdparty/lib/php') in /home/baillie/public_html/myfaq/ask.php on line 3
Any advice would be very much appreciated.
Thanks