Need help with PHP script for a contact form


hi,

i have created page:

http://www.garydavison.primeval-online.com/contact.html texthttp://www.garydavison.primeval-online.com/contact.html">texthttp://www.garydavison.primeval-online.com/contact.html

however having issues php script process form cannot life on me find tutorial on subject. if point me in right direction, or talk me through required grateful.


thanks in advance



> http://www.garydavison.pr
> imeval-online.com/contact.html

<form action="untitled-7.html"

if file php script, rename in dw files panel
something.php , upload , try again.

if looking php script-

here's stock cut 'n paste on set what, , why

1)go http://boaddrink.com -->phpformmail
download it.

extract zip file.
more detailed instructions in docs folder

2) open formmail.php in dreamweaver
make following changes (in code view, turn line numbers on)

2a)
line 4,
define('check_referer', true);
change to:
define('check_referer', false);

reason: many people use firewall or norton security restrict this.

2b)
line 43
$referers = array('www.example.com', 'example.com');
change url address of web site.

reason: isn't needed since turned referrer
checking off. change anyway.

2c)  *this hard-code recipient address php
file, totally invisible *
line 46
$recipient_array = array();
change to:
$recipient_array = array('me' => 'youremailaddress@example.com');

**of course, replace youremailaddress@example.com  with email address
you want receive form data. note single quote marks.
reason: sets email address form results sent to.
you can make list of possible recipient alias values- see readme
in docs folder.

2d) give script default "from" address use.
go line 41
change:
define('from', null);
to:
define('from', 'example name <myaddress@example.com>');
substituting name , email address.

3) file-->save , save file within local site
folder. save anythingyouwant.php

4) in dw's file panel, find anythingyouwant.php , upload remote
site.

5) open form html file in dreamweaver,

5a)click mouse form area, , select <form> tag on
lower left margin of design window.
in property inspector, should show properties of <form>
tag. in property inspector, right of action line, click
folder icon , browse , select anythingyouwant.php file
you've saved within site.

5b) click within form area , go dw menu-->insert-->form
objects-->hidden field
this inserts hidden form field.
in property inspector, change name/id of field to: recipient
and value of field to: me
the code should like:
<input name="recipient" type="hidden" id="recipient" value="me">
this tells script use "me" recipient_alias value email
address send form to.

5c: have form field collect user's email address?
if yes, if field named "email" script use
user's email reply in outgoing email

6) save , upload form page.

try form website.

optional:
1-make new page thank submitting message.
in form, insert hidden field.
name: redirect
value:  the full absolute http:// address new thank page.
if don't set redirect value- form script build "thank you,
here submitted" page. if want use dynamic page-
upload .css file uses.

2- if have field in form collect visitor's email address,
if name field  in form    email   visitor's
email address reply address in outgoing email.

there 30 or other optional form fields control form- see
readme in docs folder. 1 of optional control fields
verification.




--
alan
adobe community expert, dreamweaver

http://www.adobe.com/communities/experts/





More discussions in Dreamweaver support forum


adobe

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support