Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1916 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Marketplace     Looking For / Wanting to Sell Products     Other Digital Goods :

Simple & Expansive Contact Form

Thread title: Simple & Expansive Contact Form
Closed Thread    
    Thread tools Search this thread Display Modes  
09-08-2007, 01:46 AM
#1
Wildhoney is offline Wildhoney
Wildhoney's Avatar
Status: Request a custom title
Join date: Feb 2006
Location: Nottingham
Expertise:
Software:
 
Posts: 1,648
iTrader: 18 / 95%
 

Wildhoney is on a distinguished road

Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney

  Old  Simple & Expansive Contact Form

TalkPHP's first script giveaway I have coded a simple contact form. This script is easy to expand onto, all you have to do to add more fields is follow the simple rules:
  • Add an input box, select area, text area - whichever field type you desire to the form.
  • Give its name a prefix of txt and then follow it by the name of the actual label you wish to associate with its value.

For instance:

Code:
<p>
	<label for="txtName">Name:</label>
	<input type="text" name="txtName" id="txtName" />
</p>
This would show up in the e-mail as:


Name: myName
As you can see in the above example, the word name appears 3 times. The label node, and subsequently the ID attributes, are optional. However, the name attribute on the <input> node is required for the contact form to work correctly.

If you open up the file contained within the /lib/ directory entitled TalkPHPContact.class.php then you can edit the 2 important defines. These are:

PHP Code:
const RECEPIENT    'script@talkphp.com';
const 
TITLE        'TalkPHP - Contact'
  • RECEPIENT: The person who the e-mail will be sent to.
  • TITLE: The title of the e-mail

By default the form supports the following:
  • Name
  • Email
  • Inquiry

Any questions about the script, don't hesitate to respond within the thread. Enjoy it!

This can be downloaded from here: http://www.talkphp.com/showthread.php?t=1052

09-08-2007, 01:51 AM
#2
jd. is offline jd.
Status: TFL Veteran
Join date: May 2005
Location: FL, USA
Expertise: Design
Software: Photoshop
 
Posts: 3,010
iTrader: 5 / 100%
 

jd. is on a distinguished road

Send a message via MSN to jd.

  Old

Nice giveaway but how about having a demo of it so users can see what it looks like

09-08-2007, 01:58 AM
#3
Wildhoney is offline Wildhoney
Wildhoney's Avatar
Status: Request a custom title
Join date: Feb 2006
Location: Nottingham
Expertise:
Software:
 
Posts: 1,648
iTrader: 18 / 95%
 

Wildhoney is on a distinguished road

Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney

  Old

Just looks like a really simple contact form which requires styling. There's honestly not much to show.

09-08-2007, 04:49 PM
#4
lcphotostudio is offline lcphotostudio
Status: Member
Join date: Dec 2006
Location: Torrington, Ct, USA
Expertise:
Software:
 
Posts: 127
iTrader: 1 / 100%
 

lcphotostudio is on a distinguished road

Send a message via AIM to lcphotostudio Send a message via MSN to lcphotostudio Send a message via Yahoo to lcphotostudio

  Old

great, i just happen to be in need of a contact form.

i got this error.

what did i do wrong?

the site is www.mktstrategies.com

Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/mktstrat/public_html/lib/TalkPHPContact.class.php on line 13

this is line 13

const RECEPIENT = 'market@mktstrategies.com';

thanks
Lisa

09-09-2007, 03:50 PM
#5
wonder1 is offline wonder1
Status: I'm new around here
Join date: Sep 2007
Location:
Expertise:
Software:
 
Posts: 5
iTrader: 0 / 0%
 

wonder1 is on a distinguished road

  Old

It seems quite simple

09-09-2007, 04:24 PM
#6
.amaZe is offline .amaZe
Status: Nixism
Join date: Aug 2006
Location: Nix Yorkism
Expertise:
Software:
 
Posts: 2,147
iTrader: 19 / 100%
 

.amaZe is an unknown quantity at this point

  Old

Maybe if the form has a spam verification.

09-11-2007, 03:02 PM
#7
Wildhoney is offline Wildhoney
Wildhoney's Avatar
Status: Request a custom title
Join date: Feb 2006
Location: Nottingham
Expertise:
Software:
 
Posts: 1,648
iTrader: 18 / 95%
 

Wildhoney is on a distinguished road

Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney

  Old

Originally Posted by lcphotostudio View Post
great, i just happen to be in need of a contact form.

i got this error.

what did i do wrong?

the site is www.mktstrategies.com

Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/mktstrat/public_html/lib/TalkPHPContact.class.php on line 13

this is line 13

const RECEPIENT = 'market@mktstrategies.com';

thanks
Lisa
It is made for PHP5, Lisa. That is a PHP4 error because it does not recognise CONST. Let me adapt it for you and see how it goes. That's if I can remember all the things PHP4 doesn't like!

Edit: Here you go, Lisa. Try this one.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed