It looks like your data was inserted into the database poorly, but I'm sure you already know that. And you're stuck with what's there, right?
Can we see what is sent to the browser? I'm going on the assumption that it looks like this:
<input name="thetext" type="text" value=""this is in quotes"">
If so, you'll probably want to get rid of those extra quotes using str_replace() or just do this:
echo "<input name=\"thetext\" type=\"text\" value=$strippedtitle>\n";