Form help again :p

Is it possible to submit the same form to more than one location?<br />
<br />
Thanks<!--content-->I would use a server side language for this, though it is possible It would just be better to use server side languages for forms. Try though when you are putting your email address in the form to put a ; in there and another email address and see what it does. It might work it might now, we will have to see.<!--content-->I was betting the ; in the action would not work but it was worth a try anyway. Ok pyro this is for you because mg8 tells me that he is using a php form handler and I dont know what this is going to look like in php. Obviosuly a ; wont work :D<!--content-->pyro-<br />
<br />
<?php;<br />
$to="[email protected]";<br />
$varA= $_POST['varA];<br />
$varB=$_POST['varB'];<br />
$subject="$varA and $varB";<br />
mail($to, $subject);<br />
?><br />
<br />
I get the email, but I don't have the variables included.<br />
<br />
The user inputs data into text fields, in a form, and I used the $_post function to get those values and I want them sent to my email. When I get an email, all I get is and<br />
<br />
Thanks<!--content-->I'm assuming the form has fields named varA and varB? Also, you shouldn't put a semi-colon after the opening <?PHP, and you forgot a straight quote around your first $_POST... Try this:<br />
<br />
<?php<br />
$to="[email protected]"; <br />
$varA= $_POST['varA']; <br />
$varB=$_POST['varB']; <br />
$subject="$varA and $varB"; <br />
mail($to, $subject); <br />
?><!--content-->Still doesn't work:<br />
<br />
This is what I now have:<br />
<br />
<?php;<br />
$headers = "MIME-Version: 1.0\r\n";<br />
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";<br />
$to="[email protected]";<br />
$user= $_GET['user'];<br />
$name= $_GET['name'];<br />
$subject="$user";<br />
$message = "name = $name";<br />
mail($to, $subject, $message, $headers);<br />
?><!--content-->You still have the semi-colon after the opening <?PHP...<br />
<br />
Try this:<br />
<br />
<?php<br />
$headers = "MIME-Version: 1.0\r\n"; <br />
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; <br />
$to="[email protected]"; <br />
$user= $_GET['user']; <br />
$name= $_GET['name']; <br />
$subject="$user"; <br />
$message = "name = $name"; <br />
mail($to, $subject, $message, $headers); <br />
?><!--content-->I took it out and it didn't help..<!--content-->The $_GET variables must not be set. This worked fine for me:<br />
<br />
<?php<br />
$headers = "MIME-Version: 1.0\r\n"; <br />
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; <br />
$to="[email protected]"; <br />
//$user= $_GET['user']; <br />
//$name= $_GET['name']; <br />
$user = "user";<br />
$name = "name";<br />
$subject="$user"; <br />
$message = "name = $name"; <br />
mail($to, $subject, $message, $headers); <br />
?><!--content-->Still didn't work.<br />
<br />
It's ok. Just forget about it. I don't really need it.<!--content-->
 
Back
Top