[Phpwm] display results on same page

Phil Beynon phil at infolinkelectronics.co.uk
Thu Jul 19 10:48:25 BST 2007

> Hi guys,
> I'm struggling with this much longer than I think I need to, I guess you
> could help me here:
> How do I make the results of a search display on the same page as the
> search, sort of beneath the 'submit' button? Thanks for helping out.
> Regards,
> Ire


You set the 'action' to point back to the page name, you can also set url
variables and or (hidden) form fields to toggle things on and off

Such as...........

$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>


You can, and this is a tad more complicated, use a hidden form field to
activate a switch($action) and select from a default and and subsequent
(unlimited) number of other PHP functions to run when the page is loaded and
after seperate actions take place in multiple forms.


More information about the Phpwm mailing list