It's been a good while since I did any web programming of any kind, since I've decided to focus more on just design and illustration – but apparently an old bug has shown up, and I don't really know what to do.
It's a flash page that has a simple mail form, this is the essence of the code in flash:
And here's the essence of mail.php
Now, when I click send in the website, nothing gets sent, and I'm just not sure how I'd go about troubleshooting this. I've tested to see if the mail() function works, and it does – so I guess something must be wrong with my code.
illustration and graphic design
It's a flash page that has a simple mail form, this is the essence of the code in flash:
Code:
on (release) {
navn=navn.split(" ").join("_")
lineAdapt();
loadVariablesNum("mail.php", 0, "POST");
}
Code:
toAddy='info@site.bla';
subject="";
message="";
function lineAdapt() {
message_send = message;
while (msg_count<length(message)) {
msg_count = msg_count+1;
if ((substring(message_send, msg_count, 2)) eq "\r") {
message_send = (substring(message_send, 1, msg_count-2)) add "\n" add (substring(message_send, msg_count+2, (length(message_send))-msg_count+2));
}
}
message = message_send;
delete msg_count;
delete message_send;
}
And here's the essence of mail.php
Code:
$subjec = $subject;
//$subjec = mb_convert_encoding($subject, "ISO-8859-1", "UTF-8");
$messa = '
<html>
<body style="font-family:Verdana, sans-serif; background-color:#FFFFFF; height: 100%; width: 100%;">
<p>';
$messa .= $message;
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
$headers .= "From: ";
$headers .= $navn;
$headers .= " <";
$headers .= $from;
$headers .= ">" . "\r\n";
mail($toAddy , $subjec, $messa, $headers);
Now, when I click send in the website, nothing gets sent, and I'm just not sure how I'd go about troubleshooting this. I've tested to see if the mail() function works, and it does – so I guess something must be wrong with my code.
illustration and graphic design