This topic is locked

Getting to pages by putting links on view page

5/1/2008 2:25:19 AM
PHPRunner General questions
S
swanside author

Hello,

I tried a few weeks ago, but could not get this to work.

From my list page, I want to be able to click on the view button and on the view page put a link on there to take me to a custom view page for that master page.
My link on the mater page to the custom view page is
http://localhost/Leymac/Basic_Invoice_list...terkey1=1015397
Obviously the job&masterkey1=1015397 are different for each item on the view page, I also need to put these links on the edit page aswell, so all the user has to do is click on the edit, do the alteration and then click on the view for the custom view page
Cheers
Paul.

Alexey admin 5/1/2008

Paul,
use Insert PHP code snippet to create the link.

The id of the record edited or viewed can be accessed by this expression:

postvalue("editid1")



So the whole code should be like this:

echo '<a href="Details_list.php?mastertable=Jobs&masterkey1='.postvalue("editid1").'">Details</a>';

S
swanside author 5/1/2008

Thanks for that Alexey, but, I think I asked wrong.
From the List page, I click on the view or the edit link and get the view page or edit page.
Now I want to put a link on the view or edit page to take me to my custom made page.
The link on the list page to my custom view page is.

<A class=tablelinks

id=master_Full_Invoice{$row.1recno}

href="Full_Invoice_list.php?{$row.1Full_Invoice_masterkeys}"

replace_37>Full

Invoice</A>



Which brings back the custom view page for that item on the list page. When I copy this code onto the edit page, it brings back the custom view pages for all the items on the list page.
Thanks

Paul

Sergey Kornilov admin 5/1/2008

Paul,
on Edit/View pages you don't have access to master key value. You need to save master key value in session variable while on the list page and use this variable on Edit/View pages.

S
swanside author 5/1/2008

Wow,
You lost me now.
Thanks Anyway.
Paul