PHP is a script language very similar to Perl, but can be embedded inside HTML code syntax. For more information and language documentation, go to PHP.NET.
PHP can be used with our Windows and Linux plans only. It is not available on ColdFusion plans. To create a PHP script, use .php as the file extension. Basic PHP syntax follows:
<p>This paragraph prints as HTML.</p>
print "<p>Hello, world!</p>\n";
IMPORTANT NOTE: future versions of PHP will not support the automatic registration of form variables. The use of automatic global registration has been deprecated due to security risks. For now, Intermedia still supports the old style automatic global registration, but this will be turned off in future versions. Use the following methods:
PHP processes form variables, cookies and session variables automatically, so you can extract them from one of these special global arrays:
- $_GET - contains form variables sent through GET
- $_POST - contains form variables sent through POST
- $_COOKIE - contains HTTP cookie variables
- $_SERVER - contains server variables (e.g., REMOTE_ADDR)
- $_ENV - contains the environment variables
- $_REQUEST - a merge of the GET variables, POST variables and Cookie variables. In other words - all the information that is coming from the user, and that from a security point of view, cannot be trusted.
- $_SESSION - contains HTTP variables registered by the session module
So, if your form calls the PHP script with the GET method, and contains a field called "name", you would access the value with $_GET["name"].
Click here to lookup a function name in the PHP manual.