Forums

This topic is locked

How can I have search & result in same page? php

Posted 12 Apr 2003 01:47:02
1
has voted
12 Apr 2003 01:47:02 Manou Manou posted:
hi;
I have made a search page and result page using DWMX-PHP/mysql, using phakt,
and works fine for now,
but I don't want to have seperate page for the result page, I what the result shows up in the same page ( search.php),
well the search form will be in a small table, and the result of searching can show up in main area of the page, there are lots of search web pages like this around,

it tried to link the search form to search.php( same page), but it won't work,
anyone know how should I do this,

Appreciate your help

Replies

Replied 12 Apr 2003 10:44:47
12 Apr 2003 10:44:47 Graham Cole replied:
HI

quite a simple solution really, simply

1. set the form to call the page on which it resides.
2. create a recordset to retireve the database results
3. place the recordset results below the form with any recordset paging options as required
4. apply a show region behaviour to show this area should the recordset not be empty

and thats it, every time you search the database the form will call the same page and display the results below the form.

Hope this helps

Graham

Reply to this topic