Solved

werid output in the "input" of the form?

Posted on 2000-04-17
1
161 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
1 Comment
 
LVL 16

Accepted Solution

by:
maneshr earned 50 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
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…
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…
This video discusses moving either the default database or any database to a new volume.

705 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

20 Experts available now in Live!

Get 1:1 Help Now