Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 09-15-2010, 02:32 PM Contact form help please!
Average Talker

Posts: 26
Trades: 0
hi there all.

am trying to fix my contact form like 3 days and still nothing am so tires so thats why am asking someone if can writte my a simple contact.php for this:
Code:
Start Contact Form-->
       <div id="contact_form">        
        <script type="text/javascript" src="http://www.site.com/validation.js"></script>
        <form name="contact" method="post" action="http://www.site.com/contact.php"  onsubmit="return Validations();">
        <label>Name: (required) </label><input class="input1" id="name" name="name" type="text" value="" />
        <label>Email: (required) </label><input class="input1" id="email" name="email" type="text" value="" />
        <label>Phone: (required) </label><input class="input1" id="phone" name="phone" type="text" value="" />
        <label>Comments: (required) </label><textarea class="input2" name="comments" id="comments" cols="" rows=""></textarea><br />
        <input type="image" src="http://www.webmaster-talk.com/images/submit-button.jpg" alt="" value="" />
        </form>
       </div>
       <!--End Contact Form-->

ps:i have the validation.js


please help me

thanks.

Last edited by xhtmlhelp; 09-15-2010 at 02:41 PM..
xhtmlhelp is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-15-2010, 02:34 PM Re: contact form help
Average Talker

Posts: 26
Trades: 0
am trying this one but just got the comments!

<?php
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$phone = $_REQUEST['phone'] ;
$comments = $_REQUEST['comments'] ;
mail( "b.sejdini@yahoo.com", "Feedback Form Results", $comments, "From: $email" );
header( "Location: http://www.example.com/thankyou.html" );
?>
xhtmlhelp is offline
Reply With Quote
View Public Profile
 
Old 09-15-2010, 02:53 PM Re: contact form help
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
You need to assemble all the fields collected into one message variable. Right now, you are "collecting" all of it, but only sending the comments(hence; $comments IS the entire message).

See here: http://www.learncomputer.com/php-form-tutorial/
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
Old 09-15-2010, 02:59 PM Re: contact form help
Average Talker

Posts: 26
Trades: 0
Sir thanks for your replay.
the problem is i dont know what to change in php i have ''0'' idea from php.
as i told you am trying 3 days am trying this too

<?php
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$phone = $_REQUEST['phone'] ;
$comments = $_REQUEST['comments'] ;
mail( "b.sejdini@yahoo.com", "Feedback Form Results",$name, $phone, $comments, "From: $email" );
header( "Location: http://www.example.com/thankyou.html" );
?>

never works

please be lovly and make it for me ill be very thankfol!

regards
xhtmlhelp is offline
Reply With Quote
View Public Profile
 
Old 09-15-2010, 03:26 PM Re: contact form help
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Take a closer look at the mail documentation, specifically what parameters it takes.

I think what you are trying to do is construct a message from the input data:
PHP Code:
$message "Name: $name \n";
$message .= "Phone Number: $phone \n";
$message .= "Comments: \n $comments";

mail('b.sejdini@yahoo.com''Feedback From Results'$message'From: ' $email); 
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is offline
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 09-15-2010, 05:20 PM Re: contact form help
Ultra Talker

Posts: 366
Name: Steve
Location: Miami, FL, Earth
Trades: 0
mail() function is terrible with spam filters. Be sure to use proper mail headers (look it up), and make sure your server's smtp config and hostname reflect your domain, and/or use the -f option to set hostname in the mail() call.

Even doing all the above, you'll still have a relatively low delivery rate. Switch to an ESP or hosted SMTP service to improve that. Doesn't matter much for a contact form, just speaking in generalities here.
__________________
- Steve

President,
Please login or register to view this content. Registration is FREE

Last edited by smoseley; 09-15-2010 at 05:22 PM..
smoseley is offline
Reply With Quote
View Public Profile Visit smoseley's homepage!
 
Old 09-16-2010, 07:34 AM Re: contact form help
Average Talker

Posts: 26
Trades: 0
Quote:
Originally Posted by NullPointer View Post
Take a closer look at the mail documentation, specifically what parameters it takes.

I think what you are trying to do is construct a message from the input data:
PHP Code:
$message "Name: $name \n";
$message .= "Phone Number: $phone \n";
$message .= "Comments: \n $comments";
 
mail('b.sejdini@yahoo.com''Feedback From Results'$message'From: ' $email); 
thanks for replay sir.

i got just this on e-mail

Name:
Phone Number:
Comments:


no other info.


i add this code on my contact.php

Code:
<?php  
$message = "Name: $name \n"; 
$message .= "Phone Number: $phone \n"; 
$message .= "Comments: \n $comments"; 
mail('b.sejdini@yahoo.com', 'Feedback From Results', $message, 'From: ' . $email);  

?>

whats is the mestake?
xhtmlhelp is offline
Reply With Quote
View Public Profile
 
Old 09-16-2010, 07:37 AM Re: contact form help
prasanthmj's Avatar
Experienced Talker

Posts: 42
Name: Prasanth
Trades: 0
Here is a free contact form code that you can just plug-in.
PHP Contact form tutorial
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
prasanthmj is offline
Reply With Quote
View Public Profile
 
Old 09-16-2010, 08:10 AM Re: contact form help
Average Talker

Posts: 26
Trades: 0
Quote:
Originally Posted by prasanthmj View Post
Here is a free contact form code that you can just plug-in.
PHP Contact form tutorial
no chance sir something wrong there on line 5

anyone else got a option for me please?
xhtmlhelp is offline
Reply With Quote
View Public Profile
 
Old 09-16-2010, 08:17 AM Re: contact form help
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Quote:
Originally Posted by xhtmlhelp View Post
i add this code on my contact.php

Code:
<?php  
$message = "Name: $name \n"; 
$message .= "Phone Number: $phone \n"; 
$message .= "Comments: \n $comments"; 
mail('b.sejdini@yahoo.com', 'Feedback From Results', $message, 'From: ' . $email);  

?>

whats is the mestake?
Are you still setting $name, $phone, and $comments?
PHP Code:
$name $_POST['name'];
$email $_POST['email'];
$phone $_POST['phone'];
$comments $_POST['comments'];

$message "Name: $name \n"
$message .= "Phone Number: $phone \n"
$message .= "Comments: \n $comments"

mail('b.sejdini@yahoo.com''Feedback From Results'$message'From: ' $email); 
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is offline
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 09-16-2010, 08:23 AM Re: contact form help
Average Talker

Posts: 26
Trades: 0
Quote:
Originally Posted by NullPointer View Post
Are you still setting $name, $phone, and $comments?
PHP Code:
$name $_POST['name'];
$email $_POST['email'];
$phone $_POST['phone'];
$comments $_POST['comments'];
 
$message "Name: $name \n"
$message .= "Phone Number: $phone \n"
$message .= "Comments: \n $comments"
 
mail('b.sejdini@yahoo.com''Feedback From Results'$message'From: ' $email); 
worksssssssssss hahahhaha

thank you so much thankssssssssssssssssssssss
xhtmlhelp is offline
Reply With Quote
View Public Profile
 
Old 09-18-2010, 04:28 AM Re: contact form help
Banned

Posts: 3
Name: coach outlet
Trades: 0
thanks for share,I haven't seen that list before,nice.
coach outlet is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to contact form help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35403 seconds with 12 queries