Forum Moderators: open
<form method="post" action="save.asp">
<input id="url1" name="url1" />
<input id="url2" name="url2" />
etc.
When I submit the form, I then invoke save.asp....
Here I need to save each URL into a database field. The problem exists where I use the split function to get the form items. If a comma exists, the items are not saved properly. For example:
http://www.example.com,http://www.example2.com < save's ok.
http://www.example.com/0,03882,page.html,http://www.example2.com < does not save ok.
I know the split() function uses the "," character and that I can force the submit to change using javascript.
How do I process a URL that has a "," in it using ASP?
Thanks in advance.
[edited by: Xoc at 12:26 am (utc) on Oct. 27, 2005]
[edit reason] changed to use example.com [/edit]
URL1 = request.Form("URL1")
URL1 = replace(URL1, "chr(44)", "chr(44)")
URL = split(URL, ",")
whatever........
Then when pulling the information from the database switch them back.
URL1 = replace(URL1, "chr(44)", chr(44))
I know this is a bit crude but it is the way i have always got round " and ' in asp.
If anyone knows a better way then let me know.
Ally