Jump to content

web form sending a file


tylercaiden

Recommended Posts

Hi everyone,

 

i need my web form to send the info submitted as a txt file and not just an email... here is my current code...

 

<?php
  $email = $_REQUEST['email'] ;
  $zip = $_REQUEST['zip'] ;
  $name = $_REQUEST['name'] ;
  $phone = $_REQUEST['phone'] ;
  $order1 = $_REQUEST['RadioGroup1'] ;

  mail( "[email protected]", "subject line",
  "$order1\n $zip\n $name\n $email\n $phone\n", "From: [email protected]" );
  header( "Location: thankyou.html" );
?>

 

anyone know of a way to do this? i guess i need it to write the form as a txt on the server then attach it to an email with a subject line.

Link to comment
https://forums.phpfreaks.com/topic/85581-web-form-sending-a-file/
Share on other sites

 

im not sure, but it doesn't look like this code does write. i need it to right the data from the form to a text file first and send it, not attach a file from the users machine.

 

im not sure, but it doesn't look like this code does write. i need it to right the data from the form to a text file first and send it, not attach a file from the users machine.

 

well you need to do both, right?

 

look up fwrite()  on php.net:

http://us2.php.net/fwrite

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.