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
Solved

werid output in the "input" of the form?

Posted on 2000-04-17
1
187 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

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…

856 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