Foros del Web » Creando para Internet » Herramientas y Software »

Problema con formulario

Estas en el tema de Problema con formulario en el foro de Herramientas y Software en Foros del Web. 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 ...
  #1 (permalink)  
Antiguo 18/05/2014, 08:10
 
Fecha de Ingreso: marzo-2014
Mensajes: 5
Antigüedad: 10 años, 1 mes
Puntos: 0
Problema con formulario

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.

Etiquetas: editores-web, formulario, html, text
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:46.