This topic is locked
[SOLVED]

 List Item link to View Page

5/2/2011 9:12:13 PM
PHPRunner General questions
D
darkmage0 author

Hello
I am trying to make a field on the list page a link to the view page I looked up a post that said to use the code below as a custom script on the visual editor which I did but when I click on the link, under the list page all I get is this! I think it has something to do with using " instead of ' but I am not sure.
http://localhost/POH/Application/POH/output/agendas_view.php?editid1=
and I need
http://localhost/POH/Application/POH/output/agendas_view.php?editid1=1 or 2 what ever the record id is
Code that I used under custom on the visual editor is listed below
global $data;

$value = "<a href=\"agendas_view.php?editid1=".$data["RecordID"]."\">".$value."</a>";
The table name is agendas

the ID field is RecordID
Thank you for your time and help

Sergey Kornilov admin 5/2/2011

Your code looks good. It looks like $data["RecordID"] is empty. Just in case make sure field name is spelled properly (case-sensitive).
If you have a valid support contract post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

D
darkmage0 author 5/3/2011

Ok so I did some echo statements and figured it out remove the global $data; in
global $data;

$value = "<a href=\"tablename_view.php?editid1=".$data["RecordID"]."\">".$value."</a>";
so it looks like this
$value = "<a href=\"tablename_view.php?editid1=".$data["RecordID"]."\">".$value."</a>";
and it will work fine.