This topic is locked

List page Hyperlinks to View page

9/23/2007 2:54:25 PM
PHPRunner General questions
D
dorlisa author

Hi All:
I want the lists page (/_members_list.php)

to have the (first_name, last_name) fields as hyperlinks to view

each individual users view page (/_members_view.php?editid1=1)
How would one do that?
Thanks,

phpnewbie

A
alang 9/23/2007

In the visual editor page, set the first_name/last_name as "custom" on the "View as" tab. Enter the following:
$value = "<a href=/_members_view.php?editid1=".$data["memberID"].">".$data["first_name"]."</a>";
Substitute "memberID" for what you have called your keyfield of the members table. Using this technique you effectively display any of your fields as a hyperlink and then have this hyperlink jumping to other screens (list or view are the most common).

D
dorlisa author 9/24/2007

In the visual editor page, set the first_name/last_name as "custom" on the "View as" tab. Enter the following:

$value = "<a href=/_members_view.php?editid1=".$data["memberID"].">".$data["first_name"]."</a>";
Substitute "memberID" for what you have called your keyfield of the members table. Using this technique you effectively display any of your fields as a hyperlink and then have this hyperlink jumping to other screens (list or view are the most common).


Thanks AlanG! That worked perfectly. I will study that statement so I can apply it in other places.