You need to "escape" the double quote character as it ends the value 
prematurely. I believe you want to run a regex to change the value:

$p_name =~ s/"/"/g

That would fix a display and I *believe* it will work for form inputs as 
well. Form inputs are funny that way though.

http://danconia.org




Yuan Cheng wrote:
> Hi, All:
> 
> I encounted one situation which seems wield to me. I
> retrieved a set of data from mySQL database and try to
> diplay in a html form. I found that one field with the
> string which has " in it cannot be displayed properly.
> the code is as follows:
> 
> #####retrieve the data from Table order_record#######
> my
> $dbh=DBI->connect('dbi:mysql:ordering','yxc','9cvpt')
>         ||die "unable to connect: $DBI::errstr";
> my $sql="SELECT * FROM order_record WHERE reqID =
> $order_ID";
> 
> my $sth = $dbh->prepare($sql) || die "unable to
> prepare $sql:$DBI::errstr";
> $sth->execute();
> 
> ####display one of the data########
>  <TD bgColor=#ffffcc height=18 width=76><INPUT
> name=product_Name size=25 value="$p_name"></TD>
> 
> The problem is given by $p_name.  The original data
> for $p_name retrieved from database is, for example,
> 8"X10", but $p_name is only displayed as 8. It seems
> anything after " is eaten up.  Any idea.
> 
> Thanks 
> 
> 
> YC
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Autos - Get free new car price quotes
> http://autos.yahoo.com
> 



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to