Log in

View Full Version : Form Help! [+rep]



Jamieb
21-12-2007, 05:01 PM
Right i got this and i want it to send to my e-mail this is the code


<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" u-file="fpweb:///_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" --><p align="left">
<font size="1" face="Verdana"><b>Your dry Script:<br>
<input type="text" name="T1" size="61" value="Your 15 Word Dry"></font> <br>
Your e-mail Address ( your order payment link will be sent to when its done)<br>
<input type="text" name="T2" size="61"><br>
Msn (if you want it delivered fast) <br>
<input type="text" name="T3" size="61"><br>
<input type="submit" value="Order" name="B1"></b></font></form>

I want so when you pres submit it send to my e-mail

I have asked because I want it to be on the same page not /sendmail.php or what ever...

+rep and one who can do.. Thank you!


Jamieb

Luno1599
21-12-2007, 05:07 PM
<?php
if($_GET['send'] == "yes"){
$a = $_POST['T1'];
$b = $_POST['T2'];
$c = $_POST['T3'];
//
$to = "your emails";
$message = "
1 = $a
2 = $b
3 = $c
";
$subject = "subject here";
$mail_sent = @mail( $to, $subject, $message );
echo $mail_sent ? "Sent" : "Error";
}
?>
<form method="POST" action="?send=yes">
<!--webbot bot="SaveResults" u-file="fpweb:///_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" --><p align="left">
<font size="1" face="Verdana"><b>Your dry Script:<br>
<input type="text" name="T1" size="61" value="Your 15 Word Dry"></font> <br>
Your e-mail Address ( your order payment link will be sent to when its done)<br>
<input type="text" name="T2" size="61"><br>
Msn (if you want it delivered fast) <br>
<input type="text" name="T3" size="61"><br>
<input type="submit" value="Order" name="B1"></b></font></form>


Not tested let me know if u need help

loserWILL
21-12-2007, 05:09 PM
<?php
if($_GET['send'] == "yes"){
$a = $_POST['T1'];
$b = $_POST['T2'];
$c = $_POST['T3'];
//
$to = "your emails";
$message = "
1 = $a
2 = $b
3 = $c
";
$subject = "subject here";
$mail_sent = @mail( $to, $subject, $message );
echo $mail_sent ? "Sent" : "Error";
}
?>
<form method="POST" action="?send=yes">
<!--webbot bot="SaveResults" u-file="fpweb:///_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" --><p align="left">
<font size="1" face="Verdana"><b>Your dry Script:<br>
<input type="text" name="T1" size="61" value="Your 15 Word Dry"></font> <br>
Your e-mail Address ( your order payment link will be sent to when its done)<br>
<input type="text" name="T2" size="61"><br>
Msn (if you want it delivered fast) <br>
<input type="text" name="T3" size="61"><br>
<input type="submit" value="Order" name="B1"></b></font></form>
Not tested let me know if u need help

That should work.

Jamieb
21-12-2007, 05:11 PM
When i pressed submit it went to

Not Found
The requested URL /--WEBBOT-SELF-- was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.39 Server at Port 80

Luno1599
21-12-2007, 05:14 PM
<?php
if($_GET['send'] == "yes"){
$a = $_POST['T1'];
$b = $_POST['T2'];
$c = $_POST['T3'];
//
$to = "your emails";
$message = "
1 = $a
2 = $b
3 = $c
";
$subject = "subject here";
$mail_sent = @mail( $to, $subject, $message );
echo $mail_sent ? "Sent" : "Error";
}
?>
<form method="POST" action="?send=yes">
<p align="left">
<font size="1" face="Verdana"><b>Your dry Script:<br>
<input type="text" name="T1" size="61" value="Your 15 Word Dry"></font> <br>
Your e-mail Address ( your order payment link will be sent to when its done)<br>
<input type="text" name="T2" size="61"><br>
Msn (if you want it delivered fast) <br>
<input type="text" name="T3" size="61"><br>
<input type="submit" value="Order" name="B1"></b></font></form>


Use this one

Jamieb
21-12-2007, 05:17 PM
now its saying

Method Not Allowed
The requested method POST is not allowed for the URL /products.htm.

Apache/1.3.39 Server at Port 80

Luno1599
21-12-2007, 05:22 PM
Dose your host alow PHP :S and what version u running

Frog!
21-12-2007, 05:22 PM
now its saying

Method Not Allowed
The requested method POST is not allowed for the URL /products.htm.

Apache/1.3.39 Server at Port 80
Rename it products.php, as it is using php.

Luno1599
21-12-2007, 05:25 PM
Oh ye didnt see that :P do that then it will work :)

Jamieb
21-12-2007, 05:31 PM
+rep thanks Luno

Luno1599
21-12-2007, 05:43 PM
Your Welcome

Want to hide these adverts? Register an account for free!