<% if Request.Form("nombre") = "" then %>
El campo Nombre y Apellidos es obligatorio
<% elseif Request.Form("email") = "" then %>
El campo E-mail es obligatorio
<% elseif Request.Form("asunto") = "" then %>
El E-mail debe de tener un asunto
<% elseif Request.Form("pregunta") = "" then %>
El contenido del E-mail esta vacio
<% else %>
<% Randomize
contador = int(Rnd*1000000)
theSQL = "INSERT INTO info (identificador,fecha,nombre,email,asunto,pregunta) values ("
theSQL = theSQL & contador & ",'" & NOW() & "','" & Request.Form("nombre") & "','"
theSQL = theSQL & Request.Form("email") & "','" & Request.Form("asunto") & "','"
theSQL = theSQL & Request.Form("pregunta") & "')"
Set rs = Server.CreateObject("ADODB.Command")
rs.ActiveConnection = "dsn=baloncestosevilla.com.infoclub;"
rs.CommandText = theSQL
rs.Execute
rs.ActiveConnection.Close
if Err.Number = 0 then
Response.Redirect("informacionok.htm")
else
Response.Redirect("informacionnook.htm")
end if
%>
<% end if %>