02-16-2008
|
#1 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,402
|
Help with mail form...
Okay, well where to start, I made this html/ css form.
And I need it to be send to an email address when it's submitted....at this moment I have it being sent to an ".asp" file, but I have no clue what to do next.
So can you guys give me that answer to this million dollar question?
__________________
Youre all wrong! Martians do exist!
|
|
|
02-16-2008
|
#2 (permalink)
|
|
Janitor of Lunacy
Join Date: May 2006
Location: Sitting in the Wishing Chair
Posts: 5,345
|
__________________
Religion: It's all fun and games until someone gets burned at the stake...
|
|
|
02-16-2008
|
#3 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,402
|
thanks tamlin,
those really help!!
__________________
Youre all wrong! Martians do exist!
|
|
|
02-17-2008
|
#4 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,402
|
So I finished the .asp script and the form. They should both work fine. The problem is that when I try to "submit" the form to the .asp file, my pc asks me if I want to save the .asp file.
I know that .asp is server sided, but I don't have a server at home:P are there any sollutions for this?
__________________
Youre all wrong! Martians do exist!
|
|
|
02-17-2008
|
#5 (permalink)
|
|
Janitor of Lunacy
Join Date: May 2006
Location: Sitting in the Wishing Chair
Posts: 5,345
|
Well, the obvious answer would be to upload your ASP file to your web server and test it from there, but if you don't want to do that you'll need to make your desktop act like a web server.
What OS are you running? If it's XP Pro, you'll be able to install IIS with no problems. If you're running XP Home, there are still ways to do it but it's a bit of a fudge:
WebThang Tutorials: How to Install IIS on Windows XP Home
Installing IIS on Windows XP Home
__________________
Religion: It's all fun and games until someone gets burned at the stake...
|
|
|
02-17-2008
|
#6 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,402
|
Yeah, I tried the first...but my web server is free and it doesn't support web-sided scripts  As for my OS, Im running on an XP home edition, so I will have a look at those links...
Ill report back here when I tried al that  thanks in advance than, right?
__________________
Youre all wrong! Martians do exist!
|
|
|
02-17-2008
|
#7 (permalink)
|
|
Janitor of Lunacy
Join Date: May 2006
Location: Sitting in the Wishing Chair
Posts: 5,345
|
Quote:
Originally Posted by unleash
Yeah, I tried the first...but my web server is free and it doesn't support web-sided scripts
|
But if your web server doesn't support server-side scripting, how are you going to get your email form to work on your website?
__________________
Religion: It's all fun and games until someone gets burned at the stake...
|
|
|
02-17-2008
|
#8 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,402
|
Its an mail-form for a friend of mine  Im not going to use it personally....
__________________
Youre all wrong! Martians do exist!
|
|
|
02-17-2008
|
#9 (permalink)
|
|
Janitor of Lunacy
Join Date: May 2006
Location: Sitting in the Wishing Chair
Posts: 5,345
|
Quote:
Originally Posted by unleash
Its an mail-form for a friend of mine  Im not going to use it personally....
|
Oh right - now I understand.
__________________
Religion: It's all fun and games until someone gets burned at the stake...
|
|
|
02-19-2008
|
#10 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,402
|
alright this is really poo. I made this mail form, from almost scratch and now my friend is saying that he needs this but than the PHP version of it  So I was hoping that you guys new any fast methods of translating what I have into PHP. As this is my first go at PHP....
So do you know of any shortcuts to make what I have (.asp and .html) into an PHP file??
__________________
Youre all wrong! Martians do exist!
|
|
|
02-19-2008
|
#11 (permalink)
|
|
Janitor of Lunacy
Join Date: May 2006
Location: Sitting in the Wishing Chair
Posts: 5,345
|
There seem to be a number of solutions available:
convert asp to php - Google Search
I can't vouch for any of them, as I have no experience of PHP.
__________________
Religion: It's all fun and games until someone gets burned at the stake...
|
|
|
02-19-2008
|
#12 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,402
|
alright thanks,
well i forgot to upload my code, so here it is:P I hope more help will come...like the help of notjustgraphics...?
my .asp file:
Code:
<%@ Language="VBscript" %>
<% Option Explicit %>
<html>
<head>
<title>Mailform</title>
</head>
<body>
<%
Dim huidige_datum, tijd, vf, apparatuur, lunch, kamer, datum reservering, naam, opmerkingen, myMail
huidige_datum=request.form("huidige_datum")
tijd=request.form("tijd")
vf=request.form("vf")
apparatuur=request.form("apparatuur")
lunch=request.form("lunch")
kamer=request.form("kamer")
datum_reservering=request.form("datum_reservering")
naam=request.form("naam")
opmerkingen=request.form("opmerkingen")
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="reservering voor" & datum_reservering & _
myMail.From="reserveringen"
myMail.To="erikknippels@gmail.com"
myMail.HTMLBody =
"Datum van invullen: " & huidige_datum & _
"<br>Ingevuld door: " & naam & _
"<br><br><h1>Reservering:<h1>"
"<br>Tijd: " & tijd & _
"<br>Verwerkt Facilities: " & vf & _
"<br>apparatuur: " & apparatuur & _
"<br>lunch: " & lunch & _
"<br>kamer: " & kamer & _
"<br>datum reservering: " & datum_reservering & _
"<br>opmerkingen: " & opmerkingen & _
myMail.Send
set myMail=nothing
Response.write "Reservering verstuurd"
%>
%>
</body>
</html>
And this is my .HTML form:
Code:
<HTML><head><TITLE> Formulier </TITLE>
<style type="text/css" title="Header">
.He1 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 14px;
font-style: normal;
color: #000066;
font-weight: bold;
}
.B2 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 12px;
font-style: normal;
color: #333333;
}
</style>
<META NAME="keywords" CONTENT=" "><META NAME="description" CONTENT=" "><META NAME="ROBOTS" CONTENT="INDEX"><META NAME="Knippels" CONTENT="Form"></head><body>
<table width="65%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td width="1%" bgcolor="#330099" class="edge-tl" height="10"></td>
<td width="98%" align="center" valign="middle" bgcolor="#330099"></td>
<td width="1%" bgcolor="#330099" class="edge-tr" height="10">
</td>
</tr>
<tr>
<td width="1%" bgcolor="#330099"></td>
<td width="98%" bgcolor=""><table width="98%" border="0" cellspacing="10" cellpadding="0" align="center">
<tr><td>
<!-- Hieronder bij "form action" het pad invullen naar het mailform.asp document op de server. Ook bij "img src" pad invullen naaar logo. -->
<form action="http://members.lycos.nl/erikknippels/mailform.asp" method="post" name="form">
<img src="http://members.lycos.nl/logo RWE.png" width="114" height="55" align="right">
<table width="83%" cellspacing="5" cellpadding="0" border="0">
<tr><td width="34%" valign="center" class="He1">
1. Huidige Datum</td>
<td width="66%" valign="left" class="B2">
<INPUT TYPE="text" NAME="huidige_datum" maxlength="15" size="15" value="<datum> " ></td>
</tr>
<tr><td width="34%" valign="center" class="He1">
2. Tijd</td>
<td width="66%" valign="left" class="B2">
<INPUT TYPE="text" NAME="tijd" maxlength="255" size="15" value="<uu:mm>" ></td>
</tr>
<tr><td width="34%" valign="center" class="He1">
3. Verwerkt Facilities</td>
<td width="66%" valign="center">
<INPUT TYPE="text" NAME="vf" maxlength="255" size="28" value="" ></td>
</tr>
<tr><td width="34%" valign="center" class="He1">
4. Apparatuur</td>
<td width="66%" valign="center" class="B2">
<!--Hier nog eventjes de apparaten invullen zoals bij beamer is gedaan -->
<Select NAME="apparatuur" class="B2">
<Option Value="Beamer">Beamer
<Option Value="Laptop">Laptop
<Option Value="Flip-over">Flipover
</Select>
<!--Hier nog eventjes de apparaten invullen zoals bij beamer is gedaan --></td>
</tr>
<tr><td width="34%" valign="center" class="He1">
5. Lunch</td>
<td width="66%" valign="center">
<Select NAME="lunch" class="B2">
<Option Value="standaard">standaard
<Option Value="luxe">luxe
<Option Value="aangepast">aangepast
</Select></td>
</tr>
<tr><td width="34%" valign="center" class="He1">
6. Kamer</td><td width="66%" valign="center">
<Select NAME="kamer" class="B2">
<Option Value="eigen kamer">eigen kamer
<Option Value="filmzaal">filmzaal
<Option Value="auditorium">auditorium
<Option Value="dokterskamer">dokterskamer
<Option Value="2.17">2.17
</Select>
</td>
</tr>
<tr><td width="34%" valign="center" class="He1">
7. Datum reservering</td>
<td width="66%" valign="center" class="B2">
<INPUT NAME="datum_reservering" TYPE="text" size="15" maxlength="15" value="<dd:mm:jj>" ></td>
</tr>
<tr><td width="34%" valign="center" class="He1">
8. Naam</td>
<td width="66%" valign="center">
<INPUT NAME="naam" TYPE="text" size="25" maxlenght="255" value="" ></td>
</tr>
<tr><td width="34%" height="35" valign="center" class="He1">
9. Opmerkingen</td>
<td width="66%" valign="center">
<textarea name="opmerkingen" cols="50" rows="4" height="70" value=""></textarea></td>
</tr>
<tr><td width="34%" height="30" valign="center" class="He1">
</table>
<center>
<INPUT TYPE="submit" NAME="Apply" VALUE="Submit">
</center>
</form>
</td></tr>
</table>
</td>
<td width="1%" bgcolor="#330099">
</td>
</tr>
<tr>
<td width="1%" bgcolor="#330099" class="edge-bl" height="10"></td>
<td width="98%" bgcolor="#330099"></td>
<td width="1%" bgcolor="#330099"class="edge-br" height="10">
</td>
</tr>
</table>
</center></body></html>
I hope that I can just only change the PHP, so that it will function just as the .ASP...
__________________
Youre all wrong! Martians do exist!
|
|
|
02-19-2008
|
#13 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,402
|
Okay, I had a go at PHP, its very basic so....I changed the
Code:
<form action = "PHP.php" method = "post" >
So that it would sent the data to the right file.
Than I made this php script:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>PHP mail</title>
</head>
<?php
$to = "erikknippels@gmail.com";
$subject = "Reservering Catering";
$message = "Datum invulling: "$REQUEST_['huidige_datum'];<br>"Naam: "$REQUEST_['naam'];<br><br>"tijd: "$REQUEST_['tijd'];"Verwerkt Facilitys: "$REQUEST_['vf'];"apparatuur: "$REQUEST_['apparatuur']<br>"lunch: "$REQUEST_['lunch']<br>"kamer: "$REQUEST_['kamer']"datum reservering: "$REQUEST_['datum_reservering']"opmerkingen: "$REQUEST_['opmerkingen'] ;
$from = "reserveringen";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
<body>
</body>
</html>
But it isn't working, why not? it is a mail script right? and the email adress and such are right too...so why doesn't it work? Do you know what's up with the script....
__________________
Youre all wrong! Martians do exist!
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 05:24 PM. Content Relevant URLs by vBSEO 3.2.0
|