Solved

Sending HTML Page From CGI Using PERL

Posted on 1999-01-21
2
182 Views
Last Modified: 2010-03-05
Hi,
I want to send a HTML page consists of a RadioButton from Cgi.

SOURCE CODE
***********
print "Content-type:text/html/\n\n";
print "<html><head><title>Options</title></head>";
print "<body><form>";
print "<INPUT TYPE="radio" name="but" value="Click">Hello";
print "</form>";
print "</body>";
print "</html>";

If i run this code it gives compiletime error.suppose if i send a page without any components it is working.
0
Comment
Question by:senthil_krn
2 Comments
 
LVL 1

Accepted Solution

by:
ptruman earned 20 total points
Comment Utility
it doesnt work as you are not escaping your " marks
try :
print "<INPUT TYPE=\"radio\" name=\"but\" value=\"Click\">Hello";

(on one line) and it will work.
OR

print <<MARKER;
Content-type:text/html


<html><head><title>Options</title></head>
<body><form>
<INPUT TYPE="radio" name="but" value="Click">Hello
</form>
</body>
</html>
MARKER

0
 

Expert Comment

by:narayan123
Comment Utility
replace " by ' in the script,like that:
print "Content-type:text/html/\n\n";
print "<html><head><title>Options</title></head>";
print "<body><form>";
print "<INPUT TYPE='radio' name='but' value='Click'>Hello";
print "</form>";
print "</body>";
print "</html>";

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

771 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now