I have a recordset that I loop through to get all of the comments out of the database and into an input box to display on the screen. The problem is if there is an apostrophe in the comment it cuts the comment off. I was wondering how I go about fixing this. It prints the comment out fine if it's not in the input box but they need to be in input boxes so they can be editied. The problem spot of my code is as follows:
An example of different output would be:
Hello World would show up as Hello World
Hello's World would show up as Hello
Please Help. Thanks!
Code:
do until rs2.eof
comment = rs2("comment")
response.write "<td><input type=""text"" name=""comments"" value='"&comment&"'><br>"
rs2.movenext
loop
An example of different output would be:
Hello World would show up as Hello World
Hello's World would show up as Hello
Please Help. Thanks!