PHP mailform


#1

I have a mailform using PHP but I don’t know why its not working. Could Anyone take a look see what’s wrong with my code ? Thanks

<?php $to = "billing@bluestorm909.com"; $date = date('l dS \of F Y h:i:s A'); $msg = "Order from your site\nName: ".$_POST['name']."\nTelephone: ".$_POST['tel']."\nEmail: ".$_POST['email']."\nDetails: ".$_POST['details']."\nDate: $date"; //mail($to, "Order", $msg); $fp = fopen("mail.txt", "w"); fwrite($fp, $msg); fclose($fp); echo "code=ok"; ?>

#2

Remove the two forward slashes.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

oh yeah i forgot to leave the // out.

but It’s still not working :frowning:


#4

I think it may have to do with your email address. If I remember correctly you can not use a period when using double quotes. To use a period you have to use single quotes. As the period is used for merging strings.
Silk


#5

thanks, it’s still not working though. :frowning:


#6

I don’t see anything wrong with the mail-sending part of your script. Check the wiki article for specifics. The stuff in your script that follows the mail() function call has nothing to do with the actual sending of email.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]