Posted by good.midget on 03/02/06 16:26
Just have the software gen a url that looks like this:
http://yoursite.com/support.php?app=yourapp&version=1&release=01
your PHP in that page would look like
$app = $_REQUEST['app'];
$version = $_REQUEST['version'];
etc etc...
To prefill the textfields you can print the HTML from PHP (quick dirty
gross ewww)
or you can parse an HTML or other include for tokens to replace (decent
more advanced cleaner)
or you can just do you whole presentation layer in XML / XSLT and then
just pump out the values into the XML...
Printed HTML:
print '<input type=text name=app value="' . $app . ">';
Parsed Template
template: <input type=text name=app value="%appValue%">
php:
preg_match_all( "/\%(\S+?)\%/", $body, $matches );
$tokens = array_values( array_unique( array_values( $matches[1] ) ) );
foreach($tokens as $token) {
str_replace($token,$_tokens[$token],$body); }
XML
I'd do the xml but for that .. just rtfm ... I'm late for a meeting ;)
[Back to original message]
|