I have three forms as .php files where I set the $formname variable before sending the form action to "sendform.php"
Now, I have always used this method on my server (where Register Globals must be on because it works so easily). Now I am trying to email the form variables on a new client server and none of the variables get sent and the mail gets sent twice.
How do I send variables from a form to a mail.php page with Register Globals turned off?
I put the mail.php page on my server too and it works from there but doesn't work on the client server with the exact same file.
Code: Select all
<?php
mail("fake@emailaddy.com", "Online $formName ", "Hello, my name is $Name and I would like to make an online purchase. Please contact me for payment.\n\nBelow is my purchase request:\n\n$P1_howMany $P1_brand $P1_product $P1_size $P1_colour.\n\n$P2_howMany $P2_brand $P2_product $P2_size $P2_colour.\n\n$P3_howMany $P3_brand $P3_product $P3_size $P3_colour.\n\n$P4_howMany $P4_brand $P4_product $P4_size $P4_colour.\n\nHere is my contact information:\n\n$Name\n$Address\n$City\n$ProvState\n$Postal\n$Country\n\nI can be contacted by telephone at:\n$Telephone or $altTelephone\n\nComments:\n$Comments", "From: $Name\nReply-To: $email\nX-Mailer: PHP/" . phpversion());
?>