NAW formulier
Ik ben op zoek naar een manier om een invulveld met NAW (naam adres woonplaats en dergelijke) te maken in php. Dit formulier moet worden ingevuld, en tevens als e-mail verstuurd worden. Hoe kan ik het beste beginnen? (het moet er natuurlijk wel een beetje uitzien dus een style.css zou niet misstaan, zie www.rrvanvught.nl voor een impressie) Zou iemand een script kunnen maken / een tutorial maken voor mij, ben bezig met php te leren maar ik kom er nog niet helemaal uit, dus schakel ik jullie hulp in.
MVG Sander
gaat het om het formulier op de pagina 'uw gegevens' van jullie website?
nee het gaat om een formulier wat nog helemaal gemaakt moet worden
Bedrijfsnaam:
Adres:
Woonplaats:
Postcode:
E-mail:
Contactpersoon:
Internetadres:
Zou je hier even naar kunnen kijken als dit alvast is gemaakt zou ik hopelijk zelf de rest wel kunnen uitvissen... Alvast bedankt.
Sander
ik heb hier ook al naar gekeken maar de browser wilt niet redirecten, waarom weet ik niet, firefox en windows explorer niet, kan iemand dit verklaren?
en ook de mail functie doet het trouwens niet
2x: Waarom niet? Error?
Probeer dit eens:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
// mail naar jezelf sturen
$to = '[email protected]';
$subj = 'Dit is een test';
$msg = 'Dit is de testboodschap';
$headers = 'From: [email protected]';
if (mail ($to, $subj, $msg, $headers)) {
echo '<p>De mail is verzonden</p>';
}
else {
echo '<p>Fout bij het verzenden</p>';
}
?>
// mail naar jezelf sturen
$to = '[email protected]';
$subj = 'Dit is een test';
$msg = 'Dit is de testboodschap';
$headers = 'From: [email protected]';
if (mail ($to, $subj, $msg, $headers)) {
echo '<p>De mail is verzonden</p>';
}
else {
echo '<p>Fout bij het verzenden</p>';
}
?>
vergeet niet '[email protected]' te vervangen door je eigen adres.
nee sorry hij wil niet verder gaan, ik zie hem laden maar hem een uur aan te hebben staan doet hij nog nix... (was toch eten) maar ik zie niets als een wit scherm. Wat is hier de oorzaak van?
Doe eens simpel , en kijk dan eens in de bron van de pagina zodra je hem bekijkt met je browser. Zie je php en echo staan, dan niet. Staat er alleen helo world, dan is het goed.
jah hij ondersteund het, ik doe het via phpdev... alles werk behalve de redirect en de mail volgens mij
Of, maak een pagina met alleen maar bovenstaande code, verder niets, en kijk wat die laat zien.
System Windows NT 5.1 build 2600
Build Date Oct 5 2002 15:06:37
Server API Apache
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINDOWS\php.ini
Debug Build no
Thread Safety enabled
Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.2.0, Copyright (c) 1998-2002 Zend Technologies
with Zend Optimizer v1.3.1, Copyright (c) 1998-2002, by Zend Technologies
PHP 4 Credits
Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference
On On
allow_url_fopen
1 1
always_populate_raw_post_data
0 0
arg_separator.input
& &
arg_separator.output
& &
asp_tags
Off Off
auto_append_file
no value no value
auto_prepend_file
no value no value
browscap
no value no value
default_charset
no value no value
default_mimetype
text/html text/html
define_syslog_variables
Off Off
disable_functions
no value no value
display_errors
On On
display_startup_errors
On On
doc_root
no value no value
enable_dl
On On
error_append_string
no value no value
error_log
errors.txt errors.txt
error_prepend_string
no value no value
error_reporting
2039 2039
expose_php
On On
extension_dir
C:/phpdev/php/extensions C:/phpdev/php/extensions
file_uploads
1 1
gpc_order
GPC GPC
highlight.bg
#FFFFFF #FFFFFF
highlight.comment
#FF9900 #FF9900
highlight.default
#0000CC #0000CC
highlight.html
#000000 #000000
highlight.keyword
#006600 #006600
highlight.string
#CC0000 #CC0000
html_errors
On On
ignore_user_abort
Off Off
implicit_flush
Off Off
include_path
.;C:/phpdev/php/includes;C:/phpdev/php/class .;C:/phpdev/php/includes;C:/phpdev/php/class
log_errors
On On
magic_quotes_gpc
On On
magic_quotes_runtime
Off Off
magic_quotes_sybase
Off Off
max_execution_time
30 30
open_basedir
no value no value
output_buffering
no value no value
output_handler
no value no value
post_max_size
8M 8M
precision
14 14
register_argc_argv
On On
register_globals
Off Off
safe_mode
Off Off
safe_mode_exec_dir
no value no value
safe_mode_gid
Off Off
safe_mode_include_dir
no value no value
sendmail_from
[email protected] [email protected]
sendmail_path
no value no value
short_open_tag
On On
SMTP
mail.mydomain.com mail.mydomain.com
sql.safe_mode
Off Off
track_errors
Off Off
unserialize_callback_func
no value no value
upload_max_filesize
2M 2M
upload_tmp_dir
no value no value
user_dir
no value no value
variables_order
EGPCS EGPCS
xmlrpc_error_number
0 0
xmlrpc_errors
Off Off
y2k_compliance
Off Off
standard
Regex Library Bundled library enabled
Dynamic Library Support enabled
Internal Sendmail Support for Windows enabled
Directive Local Value Master Value
assert.active
1 1
assert.bail
0 0
assert.callback
no value no value
assert.quiet_eval
0 0
assert.warning
1 1
safe_mode_allowed_env_vars
PHP_ PHP_
safe_mode_protected_env_vars
LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags
a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry
bcmath
BCMath support enabled
calendar
Calendar support enabled
com
Directive Local Value Master Value
com.allow_dcom
Off Off
com.autoregister_casesensitive
On On
com.autoregister_typelib
Off Off
com.autoregister_verbose
Off Off
com.typelib_file
no value no value
ftp
FTP support enabled
mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.39
Directive Local Value Master Value
mysql.allow_persistent
On On
mysql.default_host
no value no value
mysql.default_password
no value no value
mysql.default_port
no value no value
mysql.default_socket
no value no value
mysql.default_user
no value no value
mysql.max_links
Unlimited Unlimited
mysql.max_persistent
Unlimited Unlimited
odbc
ODBC Support enabled
Active Persistent Links 0
Active Links 0
ODBC library Win32
Directive Local Value Master Value
odbc.allow_persistent
On On
odbc.check_persistent
On On
odbc.default_db
no value no value
odbc.default_pw
no value no value
odbc.default_user
no value no value
odbc.defaultbinmode
return as is return as is
odbc.defaultlrl
return up to 4096 bytes return up to 4096 bytes
odbc.max_links
Unlimited Unlimited
odbc.max_persistent
Unlimited Unlimited
pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 3.4 22-Aug-2000
session
Session Support enabled
Directive Local Value Master Value
session.auto_start
Off Off
session.cache_expire
180 180
session.cache_limiter
nocache nocache
session.cookie_domain
no value no value
session.cookie_lifetime
0 0
session.cookie_path
/ /
session.cookie_secure
Off Off
session.entropy_file
no value no value
session.entropy_length
0 0
session.gc_maxlifetime
1440 1440
session.gc_probability
1 1
session.name
PHPSESSID PHPSESSID
session.referer_check
no value no value
session.save_handler
files files
session.save_path
C:/phpdev\php\temp C:/phpdev\php\temp
session.serialize_handler
php php
session.use_cookies
On On
session.use_trans_sid
1 1
xml
XML Support active
XML Namespace Support active
EXPAT Version 1.95.2
wddx
WDDX Support enabled
gd
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
JPG Support enabled
PNG Support enabled
WBMP Support enabled
sockets
Sockets Support enabled
zlib
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4
Directive Local Value Master Value
zlib.output_compression
Off Off
Zend Optimizer
Optimization Pass 1 enabled
Optimization Pass 2 enabled
Optimization Pass 3 enabled
Optimization Pass 9 disabled
Optimization Pass 10 disabled
Zend Loader enabled
apache
Apache for Windows 95/NT
Apache Version Apache/1.3.27
Apache Release 10327100
Apache API Version 19990320
Hostname:Port localhost:80
Timeouts Connection: 300 - Keep-Alive: 15
Directive Local Value Master Value
child_terminate
0 0
engine
1 1
last_modified
0 0
xbithack
0 0
Apache Environment
Variable Value
COMSPEC C:\WINDOWS\system32\cmd.exe
DOCUMENT_ROOT c:/phpdev/www/
HTTP_ACCEPT text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_ACCEPT_ENCODING gzip,deflate
HTTP_ACCEPT_LANGUAGE nl-NL,nl;q=0.7,en;q=0.3
HTTP_CONNECTION keep-alive
HTTP_COOKIE session_id=95bf7bf9006830af241192f48ed37623
HTTP_HOST localhost
HTTP_KEEP_ALIVE 300
HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.12) Gecko/20050919 Firefox/1.0.7
PATH C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\COMMON~1\Odbc\FILEMA~1;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\backburner 2\;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\MySQL\MySQL Server 4.1\bin
REMOTE_ADDR 127.0.0.1
REMOTE_HOST localhost
REMOTE_PORT 3957
SCRIPT_FILENAME c:/phpdev/www/eerste.php
SERVER_ADDR 127.0.0.1
SERVER_ADMIN [email protected]
SERVER_NAME localhost
SERVER_PORT 80
SERVER_SIGNATURE <ADDRESS>Apache/1.3.27 Server at localhost Port 80</ADDRESS>
SERVER_SOFTWARE Apache/1.3.27 (Win32) PHP/4.2.3
SystemRoot C:\WINDOWS
WINDIR C:\WINDOWS
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /eerste.php
SCRIPT_NAME /eerste.php
HTTP Headers Information
HTTP Request Headers
HTTP Request GET /eerste.php HTTP/1.1
Accept text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding gzip,deflate
Accept-Language nl-NL,nl;q=0.7,en;q=0.3
Connection keep-alive
Cookie session_id=95bf7bf9006830af241192f48ed37623
Host localhost
Keep-Alive 300
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.12) Gecko/20050919 Firefox/1.0.7
HTTP Response Headers
X-Powered-By PHP/4.2.3
Keep-Alive timeout=15, max=100
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/html
Additional Modules
dbase
Environment
Variable Value
ALLUSERSPROFILE C:\Documents and Settings\All Users
CommonProgramFiles C:\Program Files\Common Files
COMPUTERNAME PC-STAGIAIRE
ComSpec C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK NO
NUMBER_OF_PROCESSORS 1
OS Windows_NT
Path C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\COMMON~1\Odbc\FILEMA~1;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\backburner 2\;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\MySQL\MySQL Server 4.1\bin
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE x86
PROCESSOR_IDENTIFIER x86 Family 15 Model 2 Stepping 9, GenuineIntel
PROCESSOR_LEVEL 15
PROCESSOR_REVISION 0209
ProgramFiles C:\Program Files
SystemDrive C:
SystemRoot C:\WINDOWS
TEMP C:\WINDOWS\TEMP
TMP C:\WINDOWS\TEMP
USERPROFILE C:\Documents and Settings\NetworkService
windir C:\WINDOWS
PHP Variables
Variable Value
_COOKIE["session_id"] 95bf7bf9006830af241192f48ed37623
_SERVER["COMSPEC"] C:\\WINDOWS\\system32\\cmd.exe
_SERVER["DOCUMENT_ROOT"] c:/phpdev/www/
_SERVER["HTTP_ACCEPT"] text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
_SERVER["HTTP_ACCEPT_CHARSET"] ISO-8859-1,utf-8;q=0.7,*;q=0.7
_SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate
_SERVER["HTTP_ACCEPT_LANGUAGE"] nl-NL,nl;q=0.7,en;q=0.3
_SERVER["HTTP_CONNECTION"] keep-alive
_SERVER["HTTP_COOKIE"] session_id=95bf7bf9006830af241192f48ed37623
_SERVER["HTTP_HOST"] localhost
_SERVER["HTTP_KEEP_ALIVE"] 300
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.12) Gecko/20050919 Firefox/1.0.7
_SERVER["PATH"] C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\PROGRA~1\\COMMON~1\\Odbc\\FILEMA~1;C:\\Program Files\\Common Files\\Autodesk Shared\\;C:\\Program Files\\backburner 2\\;C:\\Program Files\\Common Files\\Adobe\\AGL;C:\\Program Files\\MySQL\\MySQL Server 4.1\\bin
_SERVER["REMOTE_ADDR"] 127.0.0.1
_SERVER["REMOTE_HOST"] localhost
_SERVER["REMOTE_PORT"] 3957
_SERVER["SCRIPT_FILENAME"] c:/phpdev/www/eerste.php
_SERVER["SERVER_ADDR"] 127.0.0.1
_SERVER["SERVER_ADMIN"] [email protected]
_SERVER["SERVER_NAME"] localhost
_SERVER["SERVER_PORT"] 80
_SERVER["SERVER_SIGNATURE"] <ADDRESS>Apache/1.3.27 Server at localhost Port 80</ADDRESS>
_SERVER["SERVER_SOFTWARE"] Apache/1.3.27 (Win32) PHP/4.2.3
_SERVER["SystemRoot"] C:\\WINDOWS
_SERVER["WINDIR"] C:\\WINDOWS
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"]
_SERVER["REQUEST_URI"] /eerste.php
_SERVER["SCRIPT_NAME"] /eerste.php
_SERVER["PATH_TRANSLATED"] c:/phpdev/www/eerste.php
_SERVER["PHP_SELF"] /eerste.php
_SERVER["argv"]
Array
(
)
_SERVER["argc"] 0
_ENV["ALLUSERSPROFILE"] C:\\Documents and Settings\\All Users
_ENV["CommonProgramFiles"] C:\\Program Files\\Common Files
_ENV["COMPUTERNAME"] PC-STAGIAIRE
_ENV["ComSpec"] C:\\WINDOWS\\system32\\cmd.exe
_ENV["FP_NO_HOST_CHECK"] NO
_ENV["NUMBER_OF_PROCESSORS"] 1
_ENV["OS"] Windows_NT
_ENV["Path"] C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\PROGRA~1\\COMMON~1\\Odbc\\FILEMA~1;C:\\Program Files\\Common Files\\Autodesk Shared\\;C:\\Program Files\\backburner 2\\;C:\\Program Files\\Common Files\\Adobe\\AGL;C:\\Program Files\\MySQL\\MySQL Server 4.1\\bin
_ENV["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
_ENV["PROCESSOR_ARCHITECTURE"] x86
_ENV["PROCESSOR_IDENTIFIER"] x86 Family 15 Model 2 Stepping 9, GenuineIntel
_ENV["PROCESSOR_LEVEL"] 15
_ENV["PROCESSOR_REVISION"] 0209
_ENV["ProgramFiles"] C:\\Program Files
_ENV["SystemDrive"] C:
_ENV["SystemRoot"] C:\\WINDOWS
_ENV["TEMP"] C:\\WINDOWS\\TEMP
_ENV["TMP"] C:\\WINDOWS\\TEMP
_ENV["USERPROFILE"] C:\\Documents and Settings\\NetworkService
_ENV["windir"] C:\\WINDOWS
dus hij doet het gewoon naar mijn mening...
Wat geeft die trouwens aan bij het script van Jan? Geeft die wel aan dat die is verzonden?
Kijk als je hotmail hebt ook eens in je ongewenste email.
Probeer anders eens ipv.:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
// mail naar jezelf sturen
$to = '[email protected]';
$subj = 'Dit is een test';
$msg = 'Dit is de testboodschap';
$headers = 'From: [email protected]';
if (mail ($to, $subj, $msg, $headers)) {
echo '<p>De mail is verzonden</p>';
}
else {
echo '<p>Fout bij het verzenden</p>';
}
?>
// mail naar jezelf sturen
$to = '[email protected]';
$subj = 'Dit is een test';
$msg = 'Dit is de testboodschap';
$headers = 'From: [email protected]';
if (mail ($to, $subj, $msg, $headers)) {
echo '<p>De mail is verzonden</p>';
}
else {
echo '<p>Fout bij het verzenden</p>';
}
?>
Probeer eens op deze manier:
Code (php)
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
<?php
$email = '[email protected]';
$onderwerp = 'Dit is een test';
$tekst = 'Dit is de testboodschap';
$headers = 'From: [email protected]'
// de variabelen tussen ""
mail("$email","$onderwerp","$tekst","$headers");
?>
$email = '[email protected]';
$onderwerp = 'Dit is een test';
$tekst = 'Dit is de testboodschap';
$headers = 'From: [email protected]'
// de variabelen tussen ""
mail("$email","$onderwerp","$tekst","$headers");
?>
mail("$email","$onderwerp","$tekst","$headers");
doet nix... echt raar dit gebeuren