Displaying double quotes from mysql db to a text field help

Hi. My problem is that I am able to store the double quotes inside the database, but when i display it on a form it ignores everything between the double quotes for ALL the text field. But, for a textarea it works fine displaying the double quotes and the text between it. I thought this is kinda odd. Can i get some input ? Thanks.

For example in database: i said “Hello”
on the form, it just displays: i said

please see attached sample code.

<INPUT TYPE=“text” NAME=“Title” SIZE=“80” value=”" .
$image[“Title”] . “”>
n " ;
  echo "<tr><td>Title</td>" . 

     "<td><TEXTAREA NAME="Title" rows="1" cols="100">" .

     $image["Title"] . "</textarea><br />n </td></tr>" ;

  echo "<tr><td>Comments</td>" . 

     "<td><TEXTAREA NAME="Comments" rows="3" cols="60">" .

     $image["Comments"] . "</textarea><br />n</td></tr>" ;

  echo "<tr><td>Keywords</td>" . 

     "<td><INPUT TYPE="text" NAME="Keywords" SIZE="80" value="" .

$image[“KeyWords”] . “”>
n" ;

You need to convert the double quotes (that you want to display) to " other wise the HTML sees the quotes as information for a field.

HTML browsers are a “Friendly” protocol in that if it doesn’t understand the tags or information, instead of producing errors, it just makes the best effort to display the information. Thus where your double quotes might have otherwise caused an error, instead, most browsers see that as some other html information. (and hides it).

I bet if you look at the source of your page you will see the QUOTED information.

thanks ill check it out. And its weird how it displays it correctly for textareas.

Sponsor our Newsletter | Privacy Policy | Terms of Service