Chuck,
Setup your form like this (assuming search.php is the name of your page):
.
Then in your search.php page, use this structure:
# --- set $step to passed value, or else set to default ---
if (isset($_GET["step"])) { $step=$_GET["step"]; }
elseif (isset($_POST["step"])) { $step=$_POST["step"]; }
else{ $step="1"; }
if ($step==2)
{
# --- do the Search query and display results here ---
# after displaying, then set step=1 to force the search form to
come up again at the bottom of the page
$step=1;
}
if ($step==1)
{
# --- put the form here... ---
}
I use the "step" variable all the time in controlling page flow, and
allowing me to re-use the same .php file for many similar purposes to keep
the file count of the site low.
HTH,
Peter
At 02:13 PM 9/24/2002 -0500, Jay Blanchard wrote:
>[snip]
>So I if I create the form, is there way that I can have it echo on the same
>page if I am using a form?
>[/snip]
>
>Yes, using $PHP_SELF as your form action
>
>HTH
>
>Jay
>
>"Ever stop to think, and forget to start again?"
>
>*
>* Texas PHP Developers Conf Spring 2003*
>* T Bar M Resort & Conference Center*
>* New Braunfels, Texas *
>* Contact [EMAIL PROTECTED] *
>* *
>* Want to present a paper or workshop? Contact now! *
>*
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php