This topic is locked

Linking to extarnel page based on current record

11/8/2009 5:05:16 AM
PHPRunner General questions
R
ragrim author

Hi,
i hav a custom php page which displays some information that i can print. im trying to add a link or button on the view page page of my record and send the PrizeID variable to the page where PrizeID is the current record im viewing, ive tried a few things but nothing works, i keep getting undefined variable errors, heres some i have tried
btw im adding these in snippets

echo "<a href='printprizepreview.php?prizeid=$values['PrizeID']'>Print Prize Slip</a>"


$prize = $values["PrizeID"];

echo "<a href='printprizepreview.php?prizeid=$prize'>Print Prize Slip</a>"
D
Dale 11/8/2009

A quick shot at it.

Yours

echo "<a href='printprizepreview.php?prizeid=$values['PrizeID']'>Print Prize Slip</a>"

try

echo "<a href='printprizepreview.php?prizeid=".$values["PrizeID"]."'>Print Prize Slip</a>";



Hi,
i hav a custom php page which displays some information that i can print. im trying to add a link or button on the view page page of my record and send the PrizeID variable to the page where PrizeID is the current record im viewing, ive tried a few things but nothing works, i keep getting undefined variable errors, heres some i have tried
btw im adding these in snippets

echo "<a href='printprizepreview.php?prizeid=$values['PrizeID']'>Print Prize Slip</a>"


$prize = $values["PrizeID"];

echo "<a href='printprizepreview.php?prizeid=$prize'>Print Prize Slip</a>"


R
ragrim author 11/11/2009

That just gives me an undefined variable error

Sergey Kornilov admin 11/11/2009

Snippets won't work for this purpose.
Set 'View as' type of one of fields to 'Custom' and access any field value as $data["Fieldname"].
More info: http://www.xlinesoft.com/phprunner/docs/_view_as__settings_custom.htm