Page 1 of 1

PHP in Agent Script?

PostPosted: Tue Apr 08, 2014 1:14 pm
by Nefariousparity
Is it possible to put php variables in Agent Script?

For instance, I would like to do the following.

Every time we reach Postal_Code 999 the background of script will change to red. Here is a sample of my code.
<?php
$Postal_Code = "999";
$bg="";
if($Postal_Code=="999")
{
$bg = "style=' background:#ff0000;'";
}

?>
<body<?php echo $bg;?>>

Re: PHP in Agent Script?

PostPosted: Wed Apr 16, 2014 9:33 pm
by williamconley
1) Good job posting your specs

2) If you want to know if php can be used in a script, I'd say you should test it. With something simple. LOL (I don't remember, honestly). Do remember to test your PHP script directly in a web page to be sure it works before assuming it doesn't work in a script. Proper troubleshooting techniques and all. 8-)

3) If it is NOT, then you CAN switch to an iFrame script instead (which would be completely external to Vicidial and php is definitely doable there, by definition).

4) Ever heard of Javascript? Didja know it can do things like modify colors and ... well, anything else? :) (In case you don't want an iFrame, and can't get php to work).