Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/132965-pulling-my-hair-out-in-chunks/
Share on other sites

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>

 

<?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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.