Estoy utilizando dreamweaver cc para poder hacer un formulario de reservas para una página web. La cuestión es que subo el html, el asp, y el html de "envío correcto" y cuando en el primero doy a "enviar" me sale el texto del asp en vez de procesarlo y llevarme al html "envío correcto" y mandarme la información a mi correo.
Agradecería que alguien me ayudara, para ello voy a explicar lo que he hecho:
- en el html donde está el formulario, he puesto:
<form action="formulario_particulares_restaurante.asp" method=post name=cuestion>
Esto lo puse justo después de "body"
- en el asp tengo:
<title>Restaurante Pensión Sofía</title>
<%
'Creación de variables para almacenar los campos del formulario
dia= Request.Form("dia")
hora= Request.Form("hora")
numper= Request.Form("numper")
tipomenu= Request.Form("tipomenu")
nombre= Request.Form("nombre")
apellidos= Request.Form("apellidos")
tlfno= Request.Form("tlfno")
email= Request.Form("email")
observ= Request.Form("observ")
' Aqui es donde se da formato al email y se envia
strTo = "[email protected]" ' Esta es una dirección que corresponda a nuestro servidor
strSubject = "Formulario Prueba"
strBody = "<html><body>"
' ESTA TABLA ES DE INFORMACION
strBody = strBody & "<table width='600' align='center'>"
strBody = strBody & "<tr>"
strBody = strBody & "<td colspan='3'><div align='center'><font face=Verdana size=-2 color=#0a256c><b>Reserva particular restaurante</b></div></td>"
strBody = strBody & "</tr>"
strBody = strBody & "<tr>"
strBody = strBody & "<td width='200'></td>"
strBody = strBody & "<td width='320' height='2' bgcolor='#CCCC33'></td>"
strBody = strBody & "<td width='200'></td>"
strBody = strBody & "</tr>"
strBody = strBody & "</table>"
strBody = strBody & "<table width='600' align='center'>"
strBody = strBody & "<tr>"
strBody = strBody & "<td height='20' colspan='2'></td>"
strBody = strBody & "</tr>"
strBody = strBody & "<tr>"
strBody = strBody & "</tr>"
strBody = strBody & "</table>"
' EMPIEZA TABLA DE RESULTADOS
strBody = strBody & "<table width='600' align='center'>"
strBody = strBody & "<tr>"
strBody = strBody & "<td height='10' colspan='2'></td>"
strBody = strBody & "</tr>"
strBody = strBody & "<tr>"
strBody = strBody & "<td width='200'><font face=Verdana size=-2>Nombre Apellidos: </font></td>"
strBody = strBody & "<td width='480'><font face=Verdana size=-2 color=#0A256C>" & dia & "</td>"
strBody = strBody & "</tr>"
strBody = strBody & "</table>"
strBody = strBody & "<table width='600' align='center'>"
strBody = strBody & "<tr>"
strBody = strBody & "<td height='10' colspan='2'></td>"
strBody = strBody & "</tr>"
strBody = strBody & "<tr>"
strBody = strBody & "<td width='200'><font face=Verdana size=-2>Nombre Apellidos: </font></td>"
strBody = strBody & "<td width='480'><font face=Verdana size=-2 color=#0A256C>" & hora & "</td>"
strBody = strBody & "</tr>"
strBody = strBody & "</table>"
strBody = strBody & "<table width='600' align='center'>"
strBody = strBody & "<tr>"
strBody = strBody & "<td height='10' colspan='2'></td>"
strBody = strBody & "</tr>"
strBody = strBody & "<tr>"
strBody = strBody & "<td width='200'><font face=Verdana size=-2>Nombre Apellidos: </font></td>"
strBody = strBody & "<td width='480'><font face=Verdana size=-2 color=#0A256C>" & numper & "</td>"
strBody = strBody & "</tr>"
strBody = strBody & "</table>"
strBody = strBody & "<table width='600' align='center'>"
strBody = strBody & "<tr>"
strBody = strBody & "<td height='10' colspan='2'></td>"
strBody = strBody & "</tr>"
strBody = strBody & "<tr>"
strBody = strBody & "<td width='200'><font face=Verdana size=-2>Nombre Apellidos: </font></td>"
strBody = strBody & "<td width='480'><font face=Verdana size=-2 color=#0A256C>" & tipomenu & "</td>"
strBody = strBody & "</tr>"
strBody = strBody & "</table>"
strBody = strBody & "<table width='600' align='center'>"
strBody = strBody & "<tr>"
strBody = strBody & "<td height='10' colspan='2'></td>"
strBody = strBody & "</tr>"
strBody = strBody & "<tr>"
strBody = strBody & "<td width='200'><font face=Verdana size=-2>Nombre Apellidos: </font></td>"
strBody = strBody & "<td width='480'><font face=Verdana size=-2 color=#0A256C>" & nombre & "</td>"
strBody = strBody & "</tr>"
strBody = strBody & "</table>"
strBody = strBody & "<table width='600' align='center'>"
strBody = strBody & "<tr>"
strBody = strBody & "<td height='10' colspan='2'></td>"
strBody = strBody & "</tr>"
strBody = strBody & "<tr>"
strBody = strBody & "<td width='200'><font face=Verdana size=-2>Nombre Apellidos: </font></td>"
strBody = strBody & "<td width='480'><font face=Verdana size=-2 color=#0A256C>" & apellidos & "</td>"
strBody = strBody & "</tr>"
strBody = strBody & "</table>"
strBody = strBody & "<table width='600' align='center'>"
strBody = strBody & "<tr>"
strBody = strBody & "<td height='10' colspan='2'></td>"
strBody = strBody & "</tr>"
strBody = strBody & "<tr>"
strBody = strBody & "<td width='200'><font face=Verdana size=-2>Nombre Apellidos: </font></td>"
strBody = strBody & "<td width='480'><font face=Verdana size=-2 color=#0A256C>" & tlfno & "</td>"
strBody = strBody & "</tr>"
strBody = strBody & "</table>"
strBody = strBody & "<table width='600' align='center'>"
strBody = strBody & "<tr>"
strBody = strBody & "<td height='10' colspan='2'></td>"
strBody = strBody & "</tr>"
strBody = strBody & "<tr>"
strBody = strBody & "<td width='200'><font face=Verdana size=-2>Nombre Apellidos: </font></td>"
strBody = strBody & "<td width='480'><font face=Verdana size=-2 color=#0A256C>" & email & "</td>"
strBody = strBody & "</tr>"
strBody = strBody & "</table>"
strBody = strBody & "<table width='600' align='center'>"
strBody = strBody & "<tr>"
strBody = strBody & "<td height='10' colspan='2'></td>"
strBody = strBody & "</tr>"
strBody = strBody & "<tr>"
strBody = strBody & "<td width='200'><font face=Verdana size=-2>Nombre Apellidos: </font></td>"
strBody = strBody & "<td width='480'><font face=Verdana size=-2 color=#0A256C>" & observ & "</td>"
strBody = strBody & "</tr>"
strBody = strBody & "</table>"
strBody = strBody & ""
strBody = strBody & "</body></html>"
Set objCDOMail = Server.CreateObject("CDONTS.NewMail") 'Creación del objeto
objCDOMail.From = "[email protected]" 'No hay problema en que sea la misma que la anterior.
objCDOMail.To = strTo
objCDOMail.BCC = "[email protected]"
objCDOMail.Importance = 2 '(0=Low, 1=Normal, 2=High) Importancia
objCDOMail.Subject = strSubject
objCDOMail.BodyFormat=0 'Estas dos línes
objCDOMail.MailFormat=0 'permiten formatear mejor el mensaje
objCDOMail.Body = strBody
objCDOMail.Send 'Envía el mail
Set objCDOMail = Nothing
Response.redirect "../envio_correcto.html"
%>
Espero que con esto valga para dar con el/los error/es que tenga. Muchas gracias de antemano.