Solved

Question for icd

Posted on 1998-11-30
6
173 Views
Last Modified: 2013-12-25
Hi icd,

I am just starting to learn CGI and need a script similar to the one you added when you answered "How Do I do This?" Only instead of the two fields: Name and Email Address I like it to be: an URL (hyperlink) and Describtion. So without the many extras that are usually included with such scripts.

Thanks
0
Comment
Question by:gardens
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:flivauda
ID: 1829837
just change the names from name and email to url and description, post the code you are looking at and I will show you what to change
0
 

Author Comment

by:gardens
ID: 1829838
Sorry flivauda, I couldn't answer before: some family related problems. I would appreciate it if you could change the code for me.
http://www.experts-exchange.com/Q.10013514

----cut here----
#!/usr/local/bin/perl

require "cgi-bin.pl";

print&PrintHeader;
print<< END__ OF_HEADER__ ;
<html>
<head>
</head>
<body>

EMAIL: $in{'email'} NAME: $in{'name'}<br>

</body>
</html>
__END-OF-HEADER__
1;

----cut here----

Just one question about this. If I store a page from Experts Exchange (with the extension html or txt) I can't just cut and
past it. The tags for EE's table are added and so are the special
characters like &lt; and &quot;  So how can I just cut and past it (do I need a program that converts html in txt; but even then there still are the additional table tags)?

Thanks
0
 
LVL 84

Expert Comment

by:ozo
ID: 1829839
'END__ OF_HEADER__'
and
'__END-OF-HEADER__'
should be the same
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:gardens
ID: 1829840
Thanks ozo, you are right.
0
 
LVL 1

Accepted Solution

by:
flivauda earned 120 total points
ID: 1829841
in the perl code change:
EMAIL: $in{'email'} NAME: $in{'name'}<br>
to
URL: $in{'url'} DESCRIPTION: $in{'description'}<br>

and in your html form, you need to change the input fields form (most likely)
<input name="email">
to
<input name="url">

and
<input name="name">
to
<textarea name="description" rows=5 cols=50>
</textarea>

and you should be set
0
 

Author Comment

by:gardens
ID: 1829842
Thanks a lot flivauda!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question