<b>Don't use apostrophes, quotes or commas. I need to write an algorithm to replace those characters when creating records in the database.</b>
Printable View
<b>Don't use apostrophes, quotes or commas. I need to write an algorithm to replace those characters when creating records in the database.</b>
heres a patch for you
Title and Notice are html forms variblesCode:
function EditNotice()
Notice = replace(Notice, chr(10), "<br>")
Notice = replace(Notice, chr(34), """) // & #34;
Notice = replace(Notice, chr(39), "'") // & #39;
Notice = replace(Notice, chr(40), "(") // & #40;
Notice = replace(Notice, chr(41), ")") // & #41;
end Function
function ReplaceArticle()
Title = replace(Title, """, chr(34)) // & #34;
Title = replace(Title, "'", chr(39)) // & #39;
Title = replace(Title, "(", chr(40)) // & #40;
Title = replace(Title, ")", chr(41)) // & #41;
end Function
well the chars didnt come out
Renders perfectly for me..
Opera 6.04
nice...
Looks good Corey...where do i get my password for the pics page???:) :D :D
<!-- Start of harbaughproject.com 468x60 banner-->
<a href="http://harbaughproject.com" target="_blank"><img src="http://harbaughproject.com/images/hp_banner468x60.gif" border="0"></a>
<!-- End of harbaughproject.com 468x60 banner-->
<!-- Start of harbaughproject.com 88x31 banner-->
<a href="http://harbaughproject.com" target="_blank"><img src="http://harbaughproject.com/images/hp_minibanner88x31.gif" border="0"></a>
<!-- End of harbaughproject.com 88x31 banner-->
nice :)
Ya, I was thinking something along those lines. I put my object names into an array.Quote:
Originally posted by +Daemon+
heres a patch for you
Title and Notice are html forms variblesCode:
function EditNotice()
Notice = replace(Notice, chr(10), "<br>")
Notice = replace(Notice, chr(34), """) // & #34;
Notice = replace(Notice, chr(39), "'") // & #39;
Notice = replace(Notice, chr(40), "(") // & #40;
Notice = replace(Notice, chr(41), ")") // & #41;
end Function
function ReplaceArticle()
Title = replace(Title, """, chr(34)) // & #34;
Title = replace(Title, "'", chr(39)) // & #39;
Title = replace(Title, "(", chr(40)) // & #40;
Title = replace(Title, ")", chr(41)) // & #41;
end Function
well the chars didnt come out
I just hate that if I every wanted to use the database for anything else then I would have the HTML Character Codes in the records. I eventually want to put a search engine on the discussion forums and I think that the HTML Codes may complicate the search.Code:TOPIC(1) = Request.Form("topic")
TOPIC(2) = Request.Form("name")
TOPIC(3) = Request.Form("email")
TOPIC(4) = Request.Form("message")
For i = 1 To Ubound(TOPIC)
TOPIC(i) = Replace(TOPIC(i), chr(34), """, 1, -1, 1)
TOPIC(i) = Replace(TOPIC(i), chr(39), "'", 1, -1, 1)
TOPIC(i) = Replace(TOPIC(i), chr(40), "(", 1, -1, 1)
TOPIC(i) = Replace(TOPIC(i), chr(41), ")", 1, -1, 1)
TOPIC(i) = Replace(TOPIC(i), chr(42), "*", 1, -1, 1)
Next
O'Ya, it's fix now. Post away and let me know of any other problems please.