how to include php code in custom fields ?
Posted: Sat Dec 11, 2010 8:40 am
Script URL:
Version of script: 2.2
Hosting company: ezhosting.com
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
$_SERVER['HTTP_REFERER']
REFERER
include
Write your message below:
I'd like to pass some variables to the ticket, such as where they are coming from when they hit the button to create a trouble ticket, so we know where the trouble on the site is occurring without the customer having to enter a page url in a custom field.
I was wondering how I would include the referer in one of the custom fields. When I enter:
<?php echo $_SERVER['HTTP_REFERER']; ?>
in the Options of the custom fields, it simply prints out:
<?php echo $_SERVER['HTTP_REFERER']; ?>
in the custom field, how would I get the script to evaluate the code and not display it ??
I also tried using just
echo $_SERVER['HTTP_REFERER']; without the <?php ?>
$_SERVER['HTTP_REFERER'] and also with just the system variable that I wanted as default
entry in the hesk_settings.inc.php is:
'custom6'=>array('use'=>1,'place'=>0,'type'=>'text','req'=>0,'name'=>'Referer','maxlen'=>255,'value'=>'<?php echo $_SERVER[\'HTTP_REFERER\']; ?>'),
Thanks.
Tim
Version of script: 2.2
Hosting company: ezhosting.com
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
$_SERVER['HTTP_REFERER']
REFERER
include
Write your message below:
I'd like to pass some variables to the ticket, such as where they are coming from when they hit the button to create a trouble ticket, so we know where the trouble on the site is occurring without the customer having to enter a page url in a custom field.
I was wondering how I would include the referer in one of the custom fields. When I enter:
<?php echo $_SERVER['HTTP_REFERER']; ?>
in the Options of the custom fields, it simply prints out:
<?php echo $_SERVER['HTTP_REFERER']; ?>
in the custom field, how would I get the script to evaluate the code and not display it ??
I also tried using just
echo $_SERVER['HTTP_REFERER']; without the <?php ?>
$_SERVER['HTTP_REFERER'] and also with just the system variable that I wanted as default
entry in the hesk_settings.inc.php is:
'custom6'=>array('use'=>1,'place'=>0,'type'=>'text','req'=>0,'name'=>'Referer','maxlen'=>255,'value'=>'<?php echo $_SERVER[\'HTTP_REFERER\']; ?>'),
Thanks.
Tim