hi guys,
can anyone resolve this problem of creating a contact page using asp....
Code:<html> <body> <form action="realmail.asp" method="post" id="form1" name="form1"> <table width="300px" height="auto" border="0"> <tr> <td>Name</td> <td><input type="text" id="name" name="name"></td> </tr> <tr> <td>Age</td> <td><input type="text" id="age" name="age"></td> </tr> <tr> <td>Sex</td> <td><input type="text" id="sex" name="sex"></td> </tr> <tr> <td>Address</td> <td><textarea id="msg" name="msg"></textarea></td> </tr> <tr> <td>Telephone</td> <td><input type="text" id="tele" name="tele"></td> </tr> <tr> <td>Email</td> <td><input type="text" id="email" name="email"></td> </tr> <tr> <td> </td> <td> <input type="submit" name="Submit" value="Submit"> </td> </tr> </table> </form> </body> </html>
Code:<html> <body text="#000066" bgcolor="#FFFFFF" > <% dim name dim age dim sex dim msg dim tele dim email name=trim(request.form("name")) age=trim(request.form("age")) sex=trim(request.form("sex")) msg=trim(request.form("msg")) tele=trim(request.form("tele")) email=trim(request.form("email")) message= " <div align='center'><center><table border='1' width='80%'> " message=message + "<tr><td width='30%' align='left'>Name :</td>" message=message + "<td width='50%' align='center'><p align='left'>"&name&"</td></tr>" message=message + "<tr><td width='30%' align='left'>Age :</td>" message=message + "<td width='50%' align='center'><p align='left'>"&age&"</td></tr>" message=message + "<tr><td width='30%' align='left'>Age :</td>" message=message + "<td width='50%' align='center'><p align='left'>"&sex&"</td></tr>" message=message + "<tr><td width='30%' align='left'>Age :</td>" message=message + "<td width='50%' align='center'><p align='left'>"&msg&"</td></tr>" message=message + "<tr><td width='30%' align='left'>Age :</td>" message=message + "<td width='50%' align='center'><p align='left'>"&tele&"</td></tr>" message=message + "<tr><td width='30%' align='left'>Age :</td>" message=message + "<td width='50%' align='center'><p align='left'>"&email&"</td></tr>" message=message + "</table></center></div>" dim objMail Set objMail = Server.CreateObject("Persits.MailSender") If sFormat = "text" Then objMail.Ishtml = False Else objMail.Ishtml = True End If If sImportance = "high" Then objMail.Priority = 1 ElseIf sImportance = "low" Then objMail.Priority = 5 Else objMail.Priority = 3 End If objMail.Host = sMailServer objMail.From = email objMail.FromName = email objMail.AddAddress "xx@xxx.com" objMail.Subject = "Contact Request From Our Site" objMail.Body = message objMail.Send response.write "<center><b text='#000066'>We have received your Request !!!<b><center><br>" response.write "<center><b text='#000066'>We will contact you soon !!!<b><center><br>" response.write "<center><b text='#000066'>Thank You !!!<b><center><br>" %> </body> </html>



Reply With Quote

Bookmarks