Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Input information e mailing contact form(help plz)
12-09-2011, 11:20 AM
Post: #1
Input information e mailing contact form(help plz)
Sir.
wan to know how to fix some errs on Thsi contact form. contact form sending e mail successes fully "without entering input data".i need some advise to fix this problem.how to i fix this contact form isu.

e mailing contact form source
http://phpeasystep.com/phptu/8.html

plz help to solve this problem

contactus.php code

PHP Code:
<table width="400" border="0" align="center" cellpadding="3" cellspacing="1">
<
tr>
<
td><strong>Contact Form </strong></td>
</
tr>
</
table>

<
table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
<
tr>
<
td><form name="form1" method="post" action="send_contact.php">
<
table width="100%" border="0" cellspacing="1" cellpadding="3">
<
tr>
<
td width="16%">Subject</td>
<
td width="2%">:</td>
<
td width="82%"><input name="subject" type="text" id="subject" size="50"></td>
</
tr>
<
tr>
<
td>Detail</td>
<
td>:</td>
<
td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>
</
tr>
<
tr>
<
td>Name</td>
<
td>:</td>
<
td><input name="name" type="text" id="name" size="50"></td>
</
tr>
<
tr>
<
td>Email</td>
<
td>:</td>
<
td><input name="customer_mail" type="text" id="customer_mail" size="50"></td>
</
tr>
<
tr>
<
td>&nbsp;</td>
<
td>&nbsp;</td>
<
td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td>
</
tr>
</
table>
</
form>
</
td>
</
tr>
</
table

send_contact.php
PHP Code:
<?php
// Contact subject
$subject ="$subject";
// Details
$message="$detail";

// Mail of sender
$mail_from="$customer_mail";
// From
$header="from: $name <$mail_from>";

// Enter your email address
$to ='someone@somewhere.com';

$send_contact=mail($to,$subject,$message,$header);

// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
echo 
"We've recived your contact information";
}
else {
echo 
"ERROR";
}
?>

or
you can download it
http://www.internetmoneylearningguide.com/indika.zip

Plz help me to solve this not input data mailing isu.but scripte sending mails without a input data to contact form
thanks

My Site
cool birthday gifts
Click Here To register to alert pay
Find all posts by this user
Quote this message in a reply
12-10-2011, 02:42 AM
Post: #2
RE: Input information e mailing contact form(help plz)
easyPHP and most of online servers have Globle variable function off.

So send_contact.php doesn't receive variables.

You need to change every variable which come from form to,

PHP Code:
$subject $_POST['subject'];

$message $_POST['detail']; 

etc

Registration Details > Here
Rules > Here


Camera Review
Find all posts by this user
Quote this message in a reply
12-10-2011, 02:58 AM (This post was last modified: 12-10-2011 03:17 AM by Indika.)
Post: #3
RE: Input information e mailing contact form(help plz)
where i do changes.contactus.php or send_contact.php

PHP Code:
<?php
// Contact subject
$subject $_POST['subject'];
// Details
$message$_POST ['detail'] ;
// Mail of sender
$mail_from$_POST ['customer_mail'];
// From
$header$_POST['from: name <$mail_from>'];

// Enter your email address
$to $_POST['indika9000@gmail.com'];

//mobile
$mobile$_POST['mobile'] ;


$send_contact=mail($to,$subject,$message,$header,$mobile);

// Check, if message sent to your email
// display message "We've received your information"
if($send_contact){
echo 
"Thanks you.We will get you back you within 24 hours";
}
else {
echo 
"ERROR";
}
?>


is this code ok or need any changes
PHP Code:
$send_contact=mail($to,$subject,$message,$header,$mobile); 

now its even not sending e mail.i tested this on line

My Site
cool birthday gifts
Click Here To register to alert pay
Find all posts by this user
Quote this message in a reply
12-10-2011, 03:38 AM (This post was last modified: 12-10-2011 03:39 AM by Hasitha.)
Post: #4
RE: Input information e mailing contact form(help plz)
From where did $mobile come from ?

also change,

PHP Code:
$header $_POST['name']; 

Registration Details > Here
Rules > Here


Camera Review
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)