Wonder if anyone can help.
I am designing a web page using vbscript and MS Access database.
The administration pages capture the information on products i.e. screen size, height etc. and saves them to the database to be displayed on the customer web pages.
When my users fill in the details for screen size they use characters usually reserved for coding i.e. 15" for 15 inch.
When I use response.write objrs("recordfield") to display the record information the page gets messed up because of the " in the record field.
Is there a way to display the record information as a block of text and not have to worry about what the content is.
Using response.write with a access database
Moderators: JRL, Dorian (MJT support)
Here's the relevant bits of code, hope it clarify it a bit
prodsql = "SELECT * FROM products WHERE ID = " & id
set prodrs = Server.CreateObject("ADODB.RecordSet")
prodrs.open prodsql, objconn, , adopenkeyset
">" align="top">
">
The code basically goes though each of the fields in the record and displays them on the screen in a table. The problem is that some of the fields have HTML characters in them and when the page is put together it gets messed up by there being HTML code characters like “ and &
I need a way of safely displaying the record field data, regardless of what it is without it being interpreted as HTML code.
Any ideas
prodsql = "SELECT * FROM products WHERE ID = " & id
set prodrs = Server.CreateObject("ADODB.RecordSet")
prodrs.open prodsql, objconn, , adopenkeyset
">" align="top">
">
The code basically goes though each of the fields in the record and displays them on the screen in a table. The problem is that some of the fields have HTML characters in them and when the page is put together it gets messed up by there being HTML code characters like “ and &
I need a way of safely displaying the record field data, regardless of what it is without it being interpreted as HTML code.
Any ideas
