Ik heb van internet een simpel PHP-scriptje (ik been een noob op dit gebied) geplukt om wat is ingevuld op een webformulier door te sturen naar een e-mail adres.
In dit script staat een activeX element dat een stukje text opent op een nieuwe pagina (bedankt etc.).
De achtergrond van deze geopende pagina is wit terwijl ik er een background image achter wil zetten. Hoe kan ik dit doen ? Regel 127 t/m 132 geven het ActiveX script:
In dit script staat een activeX element dat een stukje text opent op een nieuwe pagina (bedankt etc.).
De achtergrond van deze geopende pagina is wit terwijl ik er een background image achter wil zetten. Hoe kan ik dit doen ? Regel 127 t/m 132 geven het ActiveX script:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
| <?php
/*
Thank you for choosing FormToEmail by FormToEmail.com
Version 1.4 November 27th 2005
COPYRIGHT FormToEmail.com 2003 - 2005
You are not permitted to sell this script, but you can use it, copy it or distribute it, providing that you do not delete this copyright notice, and you do not remove any reference to FormToEmail.com
DESCRIPTION
FormToEmail allows you to place a form on your website which your visitors can fill out and send to you. The contents of the form are sent to the email address which you specify below. The form allows your visitors to enter their name, email address and comments. If they try to send a blank form, they will be returned to the form.
Your visitors (and nasty spambots!) cannot see your email address!
When the form is sent, your visitor will get a confirmation of this on the screen, and will be given a link to continue to your homepage, or other page if you specify it.
Should you need the facility, you can add additional fields to your form, which this script will also process, without making any additional changes.
This is a PHP script. In order for it to run, you must have PHP (version 4.1.0 or later) on your webhosting account. If you are not sure about this, then ask your webhost about it.
SETUP INSTRUCTIONS
Step 1: Put the form on your webpage
Step 2: Enter your email address and continue link below
Step 3: Upload the files to your webspace
Step 1:
To put the form on your webpage, copy the code below as it is, and paste it into your webpage:
<form action="FormToEmail.php" method="post">
<table border="0" bgcolor="#ececec" cellspacing="5">
<tr><td><font face="arial" size="2">Name</font></td><td><input type="text" size="30" name="Name"></td></tr>
<tr><td><font face="arial" size="2">Email address</font></td><td><input type="text" size="30" name="Email"></td></tr>
<tr><td valign="top"><font face="arial" size="2">Comments</font></td><td><textarea name="Comments" rows="6" cols="30"></textarea></td></tr>
<tr><td> </td><td><input type="submit" value="Send"><font face="arial" size="1"> FormToEmail by <a href="http://FormToEmail.com">FormToEmail.com</a></font></td></tr>
</table>
</form>
Step 2:
Enter the email address below to send the form to:
*/
$my_email = "xxxxxx@xxxxxx.nl";
/*
Enter the continue link to offer the user after the form is sent. If you do not change this, your visitor will be given a continue link to your homepage:
If you do change it, remove the "/" symbol below and replace with the name of the page to link to, eg: "mypage.htm" or "http://www.elsewhere.com/page.htm"
*/
$continue = "http://www.oortechniek.nl/text home.htm";
/*
Step 3:
Save this file (FormToEmail.php) and upload it together with your webpage to your webspace. IMPORTANT - The file name is case sensitive! You must save it exactly as it is named above! Do not put this script in your cgi-bin directory (folder) it may not work from there.
THAT'S IT, FINISHED!
You do not need to make any changes below this line.
*/
// This line prevents values being entered in a URL
if ($_SERVER['REQUEST_METHOD'] != "POST"){exit;}
// Check for disallowed characters in the Name and Email fields.
$disallowed_name = array(':',';',"'",'"','=','(',')','{','}','@');
foreach($disallowed_name as $value)
{
if(stristr($_POST[Name],$value)){header("location: $_SERVER[HTTP_REFERER]");exit;}
}
$disallowed_email = array(':',';',"'",'"','=','(',')','{','}');
foreach($disallowed_email as $value)
{
if(stristr($_POST[Email],$value)){header("location: $_SERVER[HTTP_REFERER]");exit;}
}
$message = "";
// This line prevents a blank form being sent
while(list($key,$value) = each($_POST)){if(!(empty($value))){$set=1;}$message = $message . "$key: $value\n\n";} if($set!==1){header("location: $_SERVER[HTTP_REFERER]");exit;}
$message = $message . "-- \nThank you for using FormToEmail from http://FormToEmail.com";
$message = stripslashes($message);
$subject = "FormToEmail Comments";
$headers = "From: " . $_POST['Email'] . "\n" . "Return-Path: " . $_POST['Email'] . "\n" . "Reply-To: " . $_POST['Email'] . "\n";
mail($my_email,$subject,$message,$headers);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Form To Email PHP script from FormToEmail.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-uk">
</head>
[b]<object>
<center>
<h2>Uw bestelling is verzonden</h2>
<h3><a href="<?php print "$continue"; ?>">Terug naar de homepage</a></h3>
</center>
</object>[/b]
</font>
</body>
</html> |
[ Voor 64% gewijzigd door Verwijderd op 18-01-2006 14:08 ]