Is it possible to have two form actions?
I want the form action to be
"mailto:XX@XX?subject=XX", but I also want it to go to, ?action=submit
Is this possible?
Printable View
Is it possible to have two form actions?
I want the form action to be
"mailto:XX@XX?subject=XX", but I also want it to go to, ?action=submit
Is this possible?
Well with most modern browsers mailto wont do anything anyway, so eaiest solution would just be cut that bit out all together. If you want mail functiaonlty just add mailing functionalty in to the form handler thats picking it up in the action=submit page
How can I make the form email everything to me?
Send it to ?action=whatever and use the PHP function mail().
Simon, would this work?
PHP Code:<?php
$to = "[email protected]";
$subject = "$name";
$message = "Name: $name<br>
Job: $job<br>
Why: $wwspy<br>
about: $aboutme<br>
Email: $email<br>
Age: $age<br>
IP: $ip";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
mail($to,$subject,$message,$headers);
?>
Nevermind, I got it.
I wouldn't be using <br> for something a line break, people mightn't be using HTML capable email browsers. Just use \n.
Edit: just noticed a code error ;)
PHP Code:<?php
$message = $_POST['message'];
$wwspy = $_POST['wwspy'];
$job = $_POST['job'];
$aboutme = $_POST['aboutme'];
$email = $_POST['email'];
$age = $_POST['age'];
$ip = $_SERVER['REMOTE_ADDR'];
$to = "[email protected]";
$subject = "$name";
$message = "Name: $name<br>
Job: $job<br>
Why: $wwspy<br>
about: $aboutme<br>
Email: $email<br>
Age: $age<br>
IP: $ip";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
mail($to,$subject,$message,$headers);
?>