thesaleboat Posted August 13, 2008 Share Posted August 13, 2008 Hey guys, I just started programming 3 months ago in php. I have just created a page for people to fill out their resume on my company's website and am want to make sure before I upload it that it is safe to. How would i make it more difficult for someone to just repeatedly submit the form to be emailed. Here is my code, hope this question isn't too retarded. :-X I am also wondering how i would make the Headers bold; so that First Name, Middle Initial, Last Name etc. are bold in the email that is sent. Thanks guys in advance. <?php // Get Information from form $FirstName=$_POST['FirstName']; $MiddleInitial=$_POST['MiddleInitial']; $LastName=$_POST['LastName']; $TelephoneNumber=$_POST['TelephoneNumber']; $EmailAddress=$_POST['EmailAddress']; $HomeAddress=$_POST['HomeAddress']; $SecurityClearance=$_POST['SecurityClearance']; $Education=$_POST['Education']; $ProfessionalExperience=$_POST['ProfessionalExperience']; $ProfessionalLicenses=$_POST['ProfessionalLicenses']; $ComputerProficiency=$_POST['ComputerProficiency']; $Miscellaneous=$_POST['Miscellaneous']; //verify EmailAddress is actually valid $EmailAddress = trim($EmailAddress); $_name = "/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}~]+"; $_host = "([-0-9A-Z]+\.)+"; $_tlds = "([0-9A-Z]){2,4}$/i"; $to = "[email protected]"; $subject = "Online Resume Submittion";//.", From: ".$FirstName." ".$LastName; $EmailAddress=$_POST['EmailAddress'];//reset EmailAddress $from = "From: ".$EmailAddress; $message = "First Name: \n".$FirstName." "; $message .= "\n\n\nMiddle Initial: \n".$MiddleInitial." "; $message .= "\n\n\nLast Name: \n".$LastName." "; $message .= "\n\n\nTelephone Number: \n".$TelephoneNumber." "; $message .= "\n\n\nEmail Address: \n".$EmailAddress." "; $message .= "\n\n\nHome Address: \n".$HomeAddress." "; $message .= "\n\n\nSecurity Clearance: \n".$SecurityClearance." "; $message .= "\n\n\nEducation: \n".$Education." "; $message .= "\n\n\nProfessional Experience: \n".$ProfessionalExperience." "; $message .= "\n\n\nProfessional Licenses: \n".$ProfessionalLicenses." "; $message .= "\n\n\nComputer Proficiency: \n".$ComputerProficiency." "; $message .= "\n\n\nMiscellaneous: \n".$Miscellaneous." "; mail($to, $subject, $message, $from); //Send EmailAddress to them echo "Thank you for your application, we will be in contact with you shortly if you meet the job description requirements."; echo '<meta content="4; URL=index.htm" http-equiv="Refresh" />'; ?> Link to comment https://forums.phpfreaks.com/topic/119504-security-question-and-bold-text-in-email/ Share on other sites More sharing options...
Stooney Posted August 13, 2008 Share Posted August 13, 2008 For the bold question, see example #4 here - http://us.php.net/manual/en/function.mail.php As for making it so they can only click once to submit, just use a little bit of javascript to disable the submit onclick. Link to comment https://forums.phpfreaks.com/topic/119504-security-question-and-bold-text-in-email/#findComment-615675 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.