catas-apostrophe

    Date: 10/07/05 (Web Development)    Keywords: mysql, sql

    Quick Question:

    I'm feeling less than genius today, so I'm stumped as to why this is happening

    I've got a field I'm pulling from the mysql db.
    $name = stripslashes(urldecode(mysql_result($result, $row,'NAME')));

    If the db field contains "donkey%5C%27s" then $name echoes "donkey's"

    this looks fine when I plop it as text, but when I insert into a text INPUT field, like so:

    [input typ="text" name="name" value="[? echo $name; ?]"]

    it shows up as "donkey"

    the 's is chopped off in the text field why?

    edit : the problem was the [input... attributes were single quoted
    [input type='text' name='name' value='donkey's']

    doh.

    Source: http://www.livejournal.com/community/webdev/252293.html

« Mac IE glitch || A beginner question from... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home