Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

href used with print statement

Status
Not open for further replies.

abovebrd

IS-IT--Management
May 9, 2000
690
US

How would I use href with a print statement.
Heres what I am thinking.

I created a form that appends data to a file and returns a print statement to html (The browser displays Payroll Reporting Form)

Here is how I added it.
print header, start_html("Payroll Reporting Form"), h1("Payroll Reporting From")

Heres my problem.

I want to add a second line of text that contains an href tag. The idea would be to have link point to the original form so that the user could start all over instead of using the back function on the browser.

My problem is that I can not seem to figure out how to do this using a print statment?



-Danny






 
Sounds/Looks like you are using one of the CGI modules and are not quite sure what it is doing for you/to you. If so, you should spend a little time writing some CGI w/o the module so you can see the mechanics. The modules obscure the underlying stuff. When you want an HREF to go to the client,
Do just what you said.....

print &quot;<A HREF=\&quot;some_URL\&quot;>Link Title</A>&quot;;

or, because escaping quotes is anoying,

print qq~<A HREF=&quot;some_URL&quot;>Link Title</A>~;

If you are using one of the CGI modules, it undoubtably has a function to do this, but, for this minor chore, I doubt it saves much/any effort. I use CGI.pm extensively, but only for those things that I find it does better/easier than typing the stuff out the long way.

' hope this helps....


keep the rudder amid ship and beware the odd typo
 
goBoating,

Thats again.
It worked.

I am using CGI.qw.

I have been reading up on perl over the last few weeks. So I would be condsidered a newbie to perl. Unforunatly my position lends it self to trial by fire (thrown to wolves) etc... So I forced to jump head first into the fire !

I will try to limit my posting.




-Danny






 
Danny,
I've been there. ' been bounced on my head in the middle of a fire more than once. I would encourage you to use this forum for what it is good for. What it is good for is what you would expect. People here are happy to help with problems, but, grow a little tired when someone asks for large amounts of code or weak questions with out first doing their home work. So, please, continue doing some home work and ask for support as you need it.

Also, take note of the FAQs. There aren't many now, but the ones that are there are frequently asked question. And, there will be more in the not to distant future.


keep the rudder amid ship and beware the odd typo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top