This topic is locked

Access Another field's value (same row) on list page?

3/22/2009 2:38:14 PM
PHPRunner General questions
T
thebwit author

Ok so here's the basic idea:
List page of the table has the following fields:

id, title, position (the only unique value is id)
Now what I want to do is create a hyper link under the title variable that will show a preview of the page. This would be simple if the client could have it under the ID field because then I could do something like:

$value = $value ."<br /><a href='../preview.php?ID=$value'>preview</a>";


But because the client wants it in the title field, I simply can't use that code above. Is there a way to access the value of ID for the row? I hope I am clear on this.

J
Jane 3/23/2009

Hi,
try to use this one:

global $data;

$value = $value ."<br /><a href='../preview.php?ID=".$data["ID"]."'>preview</a>";

T
thebwit author 3/23/2009

Hi,

try to use this one:



Awesome thanks.