Hey everyone, I'm pretty new to this php stuff, but I'm trying to create a page that the user uploads there resume and that gets sent to my email account. Right now it says its been sent, but I don't see it in my inbox at all. I don't know what I'm doing wrong
Can anyone look at the code and tell me what I'm doing wrong TIA here's the link
if(isset($_POST['submit'])) { //The form has been submitted, prep a nice thank you message $output = "<div id='succsess_page'>"; "<h1>Email Sent Successfully.</h1>"; "<p>Thank you <strong>$name</strong>, your resume has been submitted to us.</p>"; "</div>";
//Set the form flag to no display (cheap way!) $flags = 'style="display:none;"';
//Deal with the email $to = 'andre@cssto.com'; $subject = 'Magic Bus Company Employment Application Form';
$message="This is a multi-part message in MIME format. Name: $name;\r\n\n Email: $email;\r\n\n Are you eligible to work in Canada? $eligible;\r\n\n What type of drivers license do you have? $type;\r\n\n
<label for=subject accesskey=S><span class="required">*</span> Are you eligible to work in Canada?</label> <select name="eligible" type="text" id="eligible"> <option value="Yes">Yes</option> <option value="NO">No</option> </select><br />
<label for=comments accesskey=C><span class="required">*</span> What type of dirvers license do you have?</label> <input name="type" type="type" id="type" size="30" /><br />
I would put a condition on the mail() function and see what it returns.
I think your error/success messages should really be moved down the code so they are dependent on the mail function succeeding rather than just the posting of the form itself.
if (mail($to, $subject, $body, $headers)) { echo("Thank you for your submission."); } else { echo("We're sorry, but there was an error processing your request."); }
This should point you as to whether your PHP system is actually sending the mail at all. I have had problems with the basic mail() function on certain ISP.
I'm pretty new to this php stuff, but I'm trying to create a page that the user uploads there resume and that gets sent to my email account. Right now it says its been sent, but I don't see it in my inbox at all. I don't know what I'm doing wrong
Can anyone look at the code and tell me what I'm doing wrong TIA
here's the link
and my code:
I think your error/success messages should really be moved down the code so they are dependent on the mail function succeeding rather than just the posting of the form itself.
if (mail($to, $subject, $body, $headers)) {
echo("Thank you for your submission.");
}
else {
echo("We're sorry, but there was an error processing your request.");
}
This should point you as to whether your PHP system is actually sending the mail at all. I have had problems with the basic mail() function on certain ISP.