You are here: Re: Software to web page to PHP to email? « All PHP « IT news, forums, messages
Re: Software to web page to PHP to email?

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 ;)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация