This topic is locked

how to Display only the selected record on LIST Page

5/17/2008 12:26:30 AM
PHPRunner General questions
R
rockrockers23 author

PROBLEM :

How to Display only the selected record on LIST Page?

EXAMPLE :

I already open a LIST PAGE.. that displays all the records.. Then i will select some of the records that i want to view.. because clicking VIEW only display the current selected record. Only 1..

NOW:

I know ADVANCED SEARCH can do that BUT the problem is, IT takes time for the Visitor(USER). and Checking the CheckBOx is for EXPORTandPRINT only..

What I want to Happen is that.. When i select recordsby checking the checkbox(More than 2 records selected),

I want my LIST PAGE to redisplay or something like that...and displaying the records that ive recently selected.. is that possible?

mikue from germany 5/18/2008

Maybe you'll like my workaround for filter section within list page.
Always: make backup (sql dump) of database
Then add field 'Filter' to table in phpmyadmin, allow NULL, tinyint(1)
In visual editor - html mode - set links into list page
<A class=toplinks onclick="frmAdmin.a.value='set_filter'; frmAdmin.submit(); return false;" href="#">Set row(s) filter</A>
<A class=toplinks onclick="frmAdmin.a.value='unset_filter'; frmAdmin.submit(); return false;" href="#">Unset row(s) filter</A>
<A class=toplinks onclick="java script: window.location='weblinks_list.php?a=search&amp;value=1&amp;SearchFor=1&amp;SearchOption=Equals&amp;SearchField=Filter';"

href="#">Call filter</A>
hint: javascript is one word

---
Event -> Before record deleted
//delete records

if(@$_POST["a"]=="delete")

return true;
global $conn;
//set filter rows

if(@$_POST["a"]=="set_filter")

{

$strSQL = "update `table` set Filter=1 where ". $where;

db_exec($strSQL,$conn);

}
//unset filter rows

if(@$_POST["a"]=="unset_filter")

{

$strSQL = "update `table` set Filter=NULL where ". $where;

db_exec($strSQL,$conn);

}
return false;
---
You only have to change 'table' with your own.
Michael