Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Contact Us Form Question


JahShuWah

Recommended Posts

Hello.

 

I have added a form element to my contact_us.php page that allows users to Browse their system and select a file to upload......

 

<input title="Full path and name of the file to attach" value="" id="F_d0e119" name="Attachment" onKeyUp="return onChange(this);" onKeyPress="return onKeyPress(this,event);" class="fldLong" size="38" type="file" onChange="return onChange(this);" />

 

But, how do I actually attach the file the user selects to the email that is sent?

 

Thanks in advance.

Link to comment
Share on other sites

:'(

Hello.

 

I have added a form element to my contact_us.php page that allows users to Browse their system and select a file to upload......

 

<input title="Full path and name of the file to attach" value="" id="F_d0e119" name="Attachment" onKeyUp="return onChange(this);" onKeyPress="return onKeyPress(this,event);" class="fldLong" size="38" type="file" onChange="return onChange(this);" />

 

But, how do I actually attach the file the user selects to the email that is sent?

 

Thanks in advance.

Link to comment
Share on other sites

can u help?

 

this "contact us" form requires that a user be registered and logged in to use.

 

it is not really being used as a "contact us" form........instead my client wants users to be able to upload files associated with complaints, etc.

 

i just need to figure out how to attach a file to an email in oscommerce.

 

if you can help or point me to any contributions that facilitate this need it would be much appreciated.

Link to comment
Share on other sites

You could use this, it does what you need:

 

http://www.phphq.net/scripts.php?p=free-scripts&id=5

 

Nothing to do with osC but a great script and it works well.

 

 

okay, cool......i'll go check out your suggestion right now.

 

in the meantime, i found the tep_email function in OsC:

 

function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {

if (SEND_EMAILS != 'true') return false;

 

// Instantiate a new mail object

$message = new email(array('X-Mailer: osCommerce Mailer'));

 

// Build the text version

$text = strip_tags($email_text);

if (EMAIL_USE_HTML == 'true') {

$message->add_html($email_text, $text);

} else {

$message->add_text($text);

}

 

// Send message

$message->build_message();

$message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);

}

 

i just want to add another optional parameter to this function so that I can attach a file ($attachment).

 

anyone know where in this function i could add an attachment?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...