Hi,
I am using web hosting through a Company called 1 and 1 (www.1and1.co.uk) for my website and as I signed up to the MS hosting package, I only get access to ASP scripting, not PHP.
At the moment, I am using forms provided by 1 and 1, but they are hosted on their servers and the colour scheme etc is not right.
What is the best options for forms (we want to put forms on the site for apartment rental booking enquiries and apartment sales enquiries), so is a case of text boxes, drop down menus and check boxes and feeding the contacts of the form to our e-mail address.
Any good (and easy!) ideas would be appreciated.
Thanks
Mark
william_stam 0 Junior Poster
buil your own! HTML with a bit of ASP included.
let me get this straight you want the public to fill out a form and then submit it to your email address?
or is that a forum (like this one)?
if it is the first not too dificult only problem is you get the form contents in a bit of an untidy mess. if you add an email component to the equqtion (ASP) like jmail you could create much better looking and easier understood return!
mark25787 0 Newbie Poster
Thanks for reply.
At moment, I have 4 forms similar to the one below:
http://www.lamanga-soluciones.com/tinc?key=hW13If6m&formname=Rentals
However, the forms are hosted and processed by my provider, so everything is set on their configuration page. What I want to do is create my own HTML page (which I can set as the same scheme as the rest of my web-site, rather than the few standard layouts that my provider gives) containing the fields required and then use an ASP component to collect the data from the form and e-mail it to me.
Can anyone provide the code required for the HTML form and the ASP element?
Thanks.
william_stam 0 Junior Poster
OK what asp email component are the hosts using find out and let me know.
the html side is prett easy (i just took the source from your form and cleaned it up a bit STILL BLOATED though)
here is the html side:
<form accept-charset="UTF-8" action="" class="body" method="post" enctype="multipart/form-data">
<table class="outerframe">
<tr>
<td class="topcenterO"></td>
</tr>
<tr>
<td class="contentO" align="left" valign="top"><table class="fieldframe">
<tr>
<td class="topleft"></td>
<td class="topcenter"></td>
<td class="topright"></td>
</tr>
<tr>
<td class="middleleft"></td>
<td class="content" align="left" valign="top"><table cellpadding="2" cellspacing="1" border="0" width="100%">
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Name</td>
<td class="input"><input class="inputform" type="text" name="field_1" size="35" maxlength="80" value="">
</td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Address</td>
<td class="input"><textarea class="inputform" cols="35" name="field_4" rows="0"></textarea></td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">E-Mail Address</td>
<td class="input"><input class="inputform" type="text" name="field_2" size="35" maxlength="80" value="">
</td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Telephone Number</td>
<td class="input"><input class="inputform" type="text" name="field_5" size="35" maxlength="80" value="">
</td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Type of Property</td>
<td class="input"><select class="text" name="field_6">
<option><span class="style_grouplabel">Apartment</span></option>
<option><span class="style_grouplabel">Villa</span></option>
</select></td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Rental Start Date</td>
<td class="input"><input class="inputform" type="text" name="field_7" size="35" maxlength="80" value="">
</td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Rental End Date</td>
<td class="input"><input class="inputform" type="text" name="field_8" size="35" maxlength="80" value="">
</td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Number of bedrooms</td>
<td class="input"><select class="text" name="field_9">
<option><span class="style_grouplabel">1</span></option>
<option><span class="style_grouplabel">2</span></option>
<option><span class="style_grouplabel">3</span></option>
</select></td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Airport Transfers Required</td>
<td class="input"><select class="text" name="field_10">
<option><span class="style_grouplabel">Yes</span></option>
<option><span class="style_grouplabel">No</span></option>
</select></td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">If Yes, please choose arrival airport</td>
<td class="input"><select class="text" name="field_11">
<option><span class="style_grouplabel">Murcia</span></option>
<option><span class="style_grouplabel">Alicante</span></option>
</select></td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Number of People</td>
<td class="input"><input class="inputform" type="text" name="field_16" size="3" maxlength="80" value="">
</td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Arrival Flight Number and Time</td>
<td class="input"><input class="inputform" type="text" name="field_12" size="35" maxlength="80" value="">
</td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Departure Flight Number and Time</td>
<td class="input"><input class="inputform" type="text" name="field_13" size="35" maxlength="80" value="">
</td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Additional Comments</td>
<td class="input"><textarea class="inputform" cols="35" name="field_14" rows="7"></textarea></td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Baby Travel Cot Required?</td>
<td class="input"><input name="field_19" type="radio" value="No" id="field_19_No" checked>
<label class="grouppointer" for="field_19_No">No</label>
<br>
<input name="field_19" type="radio" value="Yes" id="field_19_Yes">
<label class="grouppointer" for="field_19_Yes">Yes</label>
<br>
</td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Baby Pushchair Required?</td>
<td class="input"><input name="field_20" type="radio" value="No" id="field_20_No" checked>
<label class="grouppointer" for="field_20_No">No</label>
<br>
<input name="field_20" type="radio" value="Yes" id="field_20_Yes">
<label class="grouppointer" for="field_20_Yes">Yes</label>
<br>
</td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Preferred Contact Method</td>
<td class="input"><select class="text" name="field_15">
<option><span class="style_grouplabel">E-Mail</span></option>
<option><span class="style_grouplabel">Telephone</span></option>
<option><span class="style_grouplabel">Post</span></option>
</select></td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Please let us know how you found us</td>
<td class="input"><select class="text" name="field_17">
<option><span class="style_grouplabel">AltaVista</span></option>
<option><span class="style_grouplabel">Costa Calida News</span></option>
<option><span class="style_grouplabel">e-bay</span></option>
<option><span class="style_grouplabel">Google</span></option>
<option><span class="style_grouplabel">Magazine (please specify below)</span></option>
<option><span class="style_grouplabel">Other (please specify below)</span></option>
<option><span class="style_grouplabel">Roundtown Informer</span></option>
<option><span class="style_grouplabel">Word of Mouth</span></option>
<option><span class="style_grouplabel">Yahoo</span></option>
</select></td>
</tr>
</table></td>
</tr>
<tr class="field">
<td><table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="label">Further info on how you found us</td>
<td class="input"><input class="inputform" type="text" name="field_18" size="35" maxlength="80" value="">
</td>
</tr>
</table></td>
</tr>
</table></td>
<td class="middleright"></td>
</tr>
<tr>
<td class="bottomleft"></td>
<td class="bottomcenter"></td>
<td class="bottomright"></td>
</tr>
</table>
<table class="buttonframe">
<tr>
<td class="topleft"></td>
<td class="topcenter"></td>
<td class="topright"></td>
</tr>
<tr>
<td class="middleleft"><input type="reset" name="Reset" value="Clear"></td>
<td class="content" align="left" valign="top"><input type="submit" name="ok" value="Send" class="button" style="float: right; ">
</input></td>
<td class="middleright"></td>
</tr>
<tr>
<td class="bottomleft"></td>
<td class="bottomcenter"></td>
<td class="bottomright"></td>
</tr>
</table></td>
</tr>
<tr>
<td class="bottomcenterO"></td>
</tr>
</table>
</form>
mark25787 0 Newbie Poster
Just had a look on the 1and1 FAQs, and this is what I could find about the ASP.
"This Article is for 1&1 Microsoft Web Hosting Only.
Is ASPMail installed on our servers?
ASPMail is an Active Server Component designed to send email from an Active Server Page.
The ASPMail component is installed on our servers. Please find instructions on ASPMail here:
Instruction on ASPMail
You will require the Mailer.RemoteHost and this is mrvnet.kundenserver.de. "
william_stam 0 Junior Poster
test this. change the top values:
please pass on the URL (so that i can see what error it throws if any)
once the script works we can start on getting the email to send relevent info
<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "name to show from who"
Mailer.FromAddress= "your email address"
Mailer.RemoteHost = "mrvnet.kundenserver.de"
Mailer.AddRecipient "to who the email goes to"
Mailer.Subject = "email subject"
Mailer.BodyText = "body of the email"
Mailer.SendMail
%>
paste into a page then upload the page to test. I do not have aspmail on my development machine so i do not know if this will work. MS servers have a built in mail component CDONTS or CDOSYS (depends on which version OS you use), 2000 and XP = CDONTS, 2003 = CDOSYS. if the above script does not work come back to me (try to find out what OS the host runs if above does not work).
mark25787 0 Newbie Poster
Please excuse my ignorance with these ASP scripts, but on one or two sites, it mentions something about registering a dll file using "regsvr32 smtpsvg.dll". Is this the case - is it required?
william_stam 0 Junior Poster
that seems to be for email, for this script to work it is not necessary, also i think that dll is registered on installation of SMTP server (native IIS email)
Drew 14 Junior Poster
Hey guys, please use CODE tags so the code looks right. Thanks.
Edited by happygeek because: fixed formatting
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.