}
}
}
function validate(form1)
{
//****************************************************
if (form1.username.value.length<1)
{
alert("Please enter username!");
form1.username.focus();
form1.username.select();
return(false);
}
else if ((form1.username.value.indexOf("*")!=-1)||(form1.username.value.indexOf("!")!=-1)||(form1.username.value.indexOf("@")!=-1)||(form1.username.value.indexOf("$")!=-1)||(form1.username.value.indexOf("%")!=-1)||(form1.username.value.indexOf("^")!=-1)||(form1.username.value.indexOf("#")!=-1)||(form1.username.value.indexOf("=")!=-1)||(form1.username.value.indexOf("-")!=-1)||(form1.username.value.indexOf("[")!=-1)||(form1.username.value.indexOf("]")!=-1)||(form1.username.value.indexOf("{")!=-1)||(form1.username.value.indexOf("}")!=-1)||(form1.username.value.indexOf("+")!=-1)||(form1.username.value.indexOf("~")!=-1)||(form1.username.value.indexOf("?")!=-1)||(form1.username.value.indexOf("|")!=-1)||(form1.username.value.indexOf(">")!=-1)||(form1.username.value.indexOf("<")!=-1)||(form1.username.value.indexOf(" ")!=-1))
{
alert("Special characters and spaces are not allowed" );
form1.username.focus();
form1.username.select();
return(false);
}
else if (form1.username.value.length>30)
{
alert("Username must be less than thirty characters!")
form1.username.focus();
form1.username.select();
return(false);
}
<%
Dim vPath, pPath, ConString
set con=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
vPath = "users.mdb" 'use this one if database is in root of cart folder
pPath = Server.MapPath( vPath )