Jump to content

[SOLVED] Retrieving a field containing quotes


jdh23

Recommended Posts

Hi folks, I have a field in a mysql table like "...We Also Walk Dogs". If I call it with

    while($row = mysql_fetch_array($result)) {...

    ....

    $title = $row['title'];

    ...

I can go

    echo $title

and the output will be "...We Also Walk Dogs" with quotes as shown.

but when I try to display it in a <form> like this

    <input id="title" name="title" size="50" value="<? echo $title ?>"><br>

nothing shows up.  If this field has no quotes, eg. We Also Walk Dogs it shows up fine.

Is there something else I should do to make this field display as a value in a form?

Thanks,

--John

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.