wizpeep Posted November 16, 2008 Share Posted November 16, 2008 Struggling to get a form to work!!!!!!! I want to return to my email address results for the following fields:apart from CV field all others are text boxex. Job name phone email CV (file upload field) message does anyone have a template script for this???? Desperate to get it working Quote Link to comment https://forums.phpfreaks.com/topic/132965-pulling-my-hair-out-in-chunks/ Share on other sites More sharing options...
wildteen88 Posted November 16, 2008 Share Posted November 16, 2008 Post what you already have here. For what you're trying to do the only hard part would be the file upload which I assume you want to be attached to the email being sent? The rest shouldn't be a problem. Quote Link to comment https://forums.phpfreaks.com/topic/132965-pulling-my-hair-out-in-chunks/#findComment-691450 Share on other sites More sharing options...
redarrow Posted November 16, 2008 Share Posted November 16, 2008 post that form where have a look..... Quote Link to comment https://forums.phpfreaks.com/topic/132965-pulling-my-hair-out-in-chunks/#findComment-691465 Share on other sites More sharing options...
wizpeep Posted November 16, 2008 Author Share Posted November 16, 2008 I have enclosed the form content. so looking for a template to upload a file <form action="" method="post" enctype="multipart/form-data" name="form2" id="form2"> <p>job/ref no:<br /> <input name="ref_no" type="text" id="ref_no" size="40" /> <br /> name:<br /> <input name="name" type="text" id="name3" size="40" /> <br /> contact nuber:<br /> <input name="number" type="text" id="number" size="40" /> <br /> email address: <br /> <input name="email" type="text" id="email" size="40" /> <br /> upload CV<br /> <input name="cv" type="file" id="cv" size="40" /> <br /> add a message(optional)<br /> <textarea name="message" id="message2" cols="40" rows="5"></textarea> </p> <p> <input type="submit" name="submit" id="submit" value="Submit" /> <br /> </p> </form> Quote Link to comment https://forums.phpfreaks.com/topic/132965-pulling-my-hair-out-in-chunks/#findComment-691546 Share on other sites More sharing options...
laPistola Posted November 16, 2008 Share Posted November 16, 2008 <?php $job = $_REQUEST['job']; $phone = $_REQUEST['phone']; $email = $_REQUEST['email']; $message = $_REQUEST['message']; $to = '[email protected]'; $returnURL 'returnLocation.php'; mail($to,"subject here","Job: $job\nPhone: $phone\nEmail: $email\nMessage:\n$message","from: $email"); header("location: $returnURL"); ?> save as something like formMailer.php then change the action in the form tag to action="formMailer.php" this will email the form to you, not sure what other stuff you wont to do just add to the formMailer.php file Quote Link to comment https://forums.phpfreaks.com/topic/132965-pulling-my-hair-out-in-chunks/#findComment-691555 Share on other sites More sharing options...
wizpeep Posted November 17, 2008 Author Share Posted November 17, 2008 Th Quote Link to comment https://forums.phpfreaks.com/topic/132965-pulling-my-hair-out-in-chunks/#findComment-691705 Share on other sites More sharing options...
wizpeep Posted November 17, 2008 Author Share Posted November 17, 2008 Thanks have the lions share of the form the bit I am struggling with is the File upload. How to attach a file to the returned form. Quote Link to comment https://forums.phpfreaks.com/topic/132965-pulling-my-hair-out-in-chunks/#findComment-691721 Share on other sites More sharing options...
laPistola Posted November 17, 2008 Share Posted November 17, 2008 you want to send the file as an attachment with the email sent? Quote Link to comment https://forums.phpfreaks.com/topic/132965-pulling-my-hair-out-in-chunks/#findComment-691741 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.