[Phpwm] display results on same page

Phil Beynon phil at infolinkelectronics.co.uk
Thu Jul 19 15:05:00 BST 2007


> > $thispage     = $SCRIPT_NAME;
> >
> > <form method="POST" action="<?php echo $thispage; ?>?posting=yes&<?
> > php echo
> > $pagevars; ?>">
> > <p>Search:<input class="SmallInput" type="text" name="searchcrit"
> > size="20">
> > <input class="buttonDefault" type="submit" value="Search!"
> > name="B1"></p>
> > </form>
>
>
> You don't need script name, you can post it to it's self just by using ?.
> E.g:
>
> <form method="post" action="?">
> ...
> </form>
>
> Or if you wish to add variables:
>
> <form method="post" action="?some_var=some_val">
> ...
> </form>
>
> >From Paul

That was a slice of something bigger, it uses $SCRIPT_NAME as I'm
referencing the calling page name later and it needs to be totally valid
data. Plus its a more explicit way of defining the action"".

Phil




More information about the Phpwm mailing list