Jump to content

pulling my hair out in chunks


wizpeep

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.