?
Solved

werid output in the "input" of the form?

Posted on 2000-04-17
1
Medium Priority
?
204 Views
Last Modified: 2010-03-05
in the perl file:

I have

$firstName = "a b c";


and

in the form, I put
print"<input type ='text' input name='firstName' value=$firstName >\n";

while I check the output of it, it only
show in the input text of $firstName as
"a" not "a b c", why?
0
Comment
Question by:syu2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 16

Accepted Solution

by:
maneshr earned 200 total points
ID: 2724169
you have to print the line as follows...

print"<input type ='text' input name='firstName' value=\"$firstName\">\n";


NOTE: the \" and \" before and after $firstName. Without these quotes, HTML reads  value=a b c and therfore accepts only a.

With the quotes it will be read as value="a b c"

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…
Six Sigma Control Plans
Suggested Courses

743 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