On 23 Apr 2006 in macromedia.dreamweaver.appdev, magikred
wrote:
> Please see code attached below (I have inserted the word
MODIFY to
> show the part of the XML URI I would like to modify...)
>
> In the setXML, I would like to keep
> ("
http://www.digg.com/rss_search?search=")
hardcoded, yet have the
> ability to insert data (i.e. a keyword) passed from the
previous
> form. Here are some example so you can see what I
mean...
>
>
http://www.digg.com/rss_search?search=apple
>
http://www.digg.com/rss_search?search=google
>
http://www.digg.com/rss_search?search=sgi
>
> Any help will be much appreciated, this is driving me
insane. I know
> exactly what I what to achieve, but am much more of a
visual person.
> Not knowiing the correct code / syntax or whether this
can be done
> at all is driving me insane!
>
> Kind Regards
>
> Craig Hughes
> (magikred)
> -
>
> <p>You searched for: <?php echo $_GET['tag'];
?></p>
> <p>
> <?php
> $mm_xsl = new MM_XSLTransform();
> $mm_xsl->setXML("
http://www.digg.com/rss_search?search=MODIFY");
> $mm_xsl->setXSL("feed-test.xsl");
> echo $mm_xsl->Transform();
> ?></p>
Why not build the string first, then do the transform, thus:
<?php
$mm_xsl = new MM_XSLTransform();
$searchstring = '
http://www.digg.com/rss_search?search=';
$engine = whatever(); /* logic to determine engine goes here
*/
$searchstring .= $engine;
$mm_xsl->setXML($searchstring);
$mm_xsl->setXSL("feed-test.xsl");
echo $mm_xsl->Transform();
?></p>
--
Joe Makowiec
http://makowiec.net/
Email:
http://makowiec.net/email.php