This topic is locked

Putting Username on Printer Friendly Option

1/31/2007 3:38:20 PM
PHPRunner General questions
R
run4sbc author

I've been playing with the code trying to get the username to display on the printer friendly page, for Identification purposes for me. I cannot get it to work. I know you have to add the spot for it in the HTML and you have to read the document in the PHP but I can't get it to work. Has anyone else done this?

Sergey Kornilov admin 1/31/2007

What version of PHPRunner do you use?
Please check forum guidelines:

http://www.asprunner.com/forums/index.php?showtopic=4497

R
run4sbc author 1/31/2007

PHP 3.1 Build 187
Sorry, I didn't see the guidelines.
I am trying to manually edit my printing page to dress it up some, and I was the username to appear just like it does on the typical list page. I am assuming that you need to add some code into the PHP file that looks up the item in the protection table. I have inserted the code from the list page in the HTML file so it says to show the item, but I guess I cant get it to look up the username.

Sergey Kornilov admin 1/31/2007

I would recommend to use PrintOnLoad event and the following code:

function PrintOnLoad()

{

echo $_SESSION["UserID"];
}


In visual editor you can move yellow PrintOnLoad rectangle where you like to display logged user name.