Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Send the form data to e-mail... made the form, need help now ;)
Old 09-29-2007, 03:02 PM Send the form data to e-mail... made the form, need help now ;)
Novice Talker

Posts: 9
Trades: 0
Hi,

I uploaded this computer customizer script here... and I want the result of the chosen custom computer to be sent to e-mail... then I can contact the person and tell them about listing it on eBay.

The script is here:
http://cjnet.info/e/pcconfigurator/pc_configurator_zen_cart.php.htm
(Ignore the crap (errors) at the top, it still works)...

and I want each of the items chosen (plus the price), and then the total price to be e-mailed to be.
I also need a box that allows then to enter their e-mail so i can contact them, which needs to be sent to the email.

If you can help me on either of these, I would be greatful.
cj-real is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-29-2007, 03:21 PM Re: Send the form data to e-mail... made the form, need help now ;)
Junior Talker

Posts: 2
Name: Mike Robinson
Trades: 0
Woo first post!

Here is how I would do it:

First you need to make a form template in HTML that you want mailed to you. Then, if you want to use just one script to generate the form that you have there as the one sending the mail, you need to make it check whether the form has been mailed. You can do this by doing something like:

PHP Code:
<?php 
if (isset($_POST['submit'])) {
// check variables, send the mail and give confirmation to user
}
else {
// display default form to the user
}
You need to put all of the variables they submitted into the template, which will be emailed to you. You send the form using the mail() function.

Last edited by mikerobinson; 09-29-2007 at 03:23 PM..
mikerobinson is offline
Reply With Quote
View Public Profile
 
Old 09-30-2007, 03:07 PM Re: Send the form data to e-mail... made the form, need help now ;)
Foundationflash's Avatar
Ultra Talker

Posts: 410
Name: Harry Burt
Location: Colchester, Essex, England
Trades: 0
Just find a tutorial somewhere about the mail() function, load in a few form results, and then send. Easy peasy. The really easy way to load all values in a form is like this:
Code:
<?php
if($_POST){
$MsgBody = "Here are your form results:\n";
foreach ($_POST as $Field=>$Value) $MsgBody .= "$Field: $Value\n";
    mail("example@example.com", "Your Form Results", $MsgBody, "From: sender@sender.com");
}
?>
--
Foundation Flash: tutorials and web design
www.foundation-flash.com
Foundationflash is offline
Reply With Quote
View Public Profile Visit Foundationflash's homepage!
 
Old 09-30-2007, 04:10 PM Re: Send the form data to e-mail... made the form, need help now ;)
Novice Talker

Posts: 9
Trades: 0
I thought it would be easy, but could search that myself... which I have done and making a new form is fair enough but the data and scripts in my page will not send.

This is why I need help
cj-real is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Send the form data to e-mail... made the form, need help now ;)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19175 seconds with 12 queries