No worries🙂 Basically want was happening was this was getting sent to the browser:
<td><input type='text' name='title' value='It's a great day' size='40' maxlength='60'></td>
Since you enclosed your value value (akward that🙂 in single quotes, the browser was interpreting the apstrophe in "It's" as the closing quote. By calling stripslashes() on $title, you were ensuring that "It's" and not "It\'s" was being sent. "It\'s" would have worked properly.
The reason why it worked in the <textarea> and not in the <input> is that the data in a textarea is enclosed between open and close tags (ie. <textarea>$text</textarea>). Since the text isn't passed as a parameter enclosed in quotes, the escape slashes are read as text and not escapes. When text is passed into an input, it is usually in a quoted parameter (ie. value='$text') and so escape slashes are read as escapes and not printed. Does that make sense or have I just muddied the waters here?
Let's say $text = "more text, it\'s a good thing";
The dots are concatenation operators. PHP supports something called variable interpolation. Basically, that means you can call a variable within a string to print or concatenate.
echo "This is text. This is more text: $text";
will print:
This is text. This is more text: more text, it\'s a good thing
f you try to place a function call inside a string, it simply prints the text of the function call.
echo "This is text. This is more text: stripslashes($text)";
will print:
This is text. This is more text: stripslashes(more text, it\'s a good thing)
You need to escape from the string itself and then concatenate the function's output back into the string. To do that you close the string with a quote (single or double dependingly) and use the concatenation operator to append the function return. You can then use the concatentation operation and a quote to re-open the string and continue typing. So......
echo "This is text. This is more text: ".stripslashes($text);
prints
This is text. This is more text: stripslashes(more text, it's a good thing)
with the escape slash happily removed. HTH. Feel free to drop an email if you want further explanation or clarification. The PHP Manual is also a great spot for info, I'd highly recommend taking a glance through it: http://www.php.net/manual/en/.
-geoff