Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: MySQL, text box anomaly

by Masem (Monsignor)
on Feb 06, 2002 at 18:36 UTC ( #143665=note: print w/ replies, xml ) Need Help??


in reply to MySQL, text box anomaly

Boo's got the answer, but technically, you should always quote the values of attributes in HTML, even if it's just a single word (it's required in XML, but even in HTML3 and 4, it's highly suggested, otherwise you have undefined behavior). Thus, you should be outputting:

print "<input type=\"text\" name=\"address\" value=\"$result[0]\">";

-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important


Comment on Re: MySQL, text box anomaly
Download Code
Re: Re: MySQL, text box anomaly
by joealba (Hermit) on Feb 06, 2002 at 18:52 UTC
    The qq operator is my close friend. It helps you escape from the escapes. :)

    print qq(<input type="text" name="address" value="$result[0]">\n);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://143665]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (18)
As of 2015-07-02 13:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (38 votes), past polls