Results 1 to 8 of 8

Thread: form problems. pls help

  1. #1
    Join Date
    Jan 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default form problems. pls help

    Why doesn't include the contents of the submittion (only the labels)? THXXXX

    <?php



    $totalcomments.="Company:".$company."\n\n";
    $totalcomments.="New_or_existing:".$new_or_existing."\n\n";
    $totalcomments.="Allocated_or_pooled:".$allocated_or_pooled."\n\n";
    $totalcomments.="Profit_sharing:".$profit_sharing."\n\n";
    $totalcomments.="Profit_share_allocation_method:".$profit_share_allocation_method."\n\n";
    $totalcomments.="Employer:".$employer."\n\n";
    $totalcomments.="Number_of_employers:".$number_of_employers."\n\n";
    $totalcomments.="Name:".$name."\n\n";
    $totalcomments.="Email:".$email."\n\n";
    $totalcomments.="Phone:".$phone."\n\n";

    $notify_email = "dave@sozopivotal.com";
    //$notify_email = "dave@sozopivotal.com";
    $notify_subject = "Thank you!";
    $notifyadmin_subject = "Request for Quote";
    $notify_user = "Thanks for the submission ";
    //$from = "dave@sozopivotal.com";
    $from = "dave@sozopivotal.com";
    $notify_message = "There is feedback";
    $visitor_message = "Thank you for requesting a quote. At Applied Plan Administrators we look forward to serving you. If you have any questions, please do not hesitate to contact us at 248.645.6145 or via email at info@appliedplan.com.
    ";






    mail( "$email", "$notify_subject", "$visitor_message", "From: $from");
    mail( "$notify_email", "$notifyadmin_subject", "$totalcomments", "From: $email");
    //mail( "$mailto", "$subject", "$message", "From: $from");



    header("Location:http://www.appliedplan.com/new_site/thankyou.html");
    exit();


    ?>

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    $message is not set to any value. So, yeah, you get no message. It looks like you should use $totalcomments or change that name to $message.

    You also don't need to place the values in quotes like that. "$email" is just extra work for the parser-- using $email will do the same thing. That's true of all of it, except for the strings (text) of course. Oddly, though, you escape from the quotes for adding the variables nearer the top-- you don't need to, if you're using double quotes. You also need double quotes for the \n characters. But you could use the faster single quotes for the first part of those.

    Another problem you'll run into if you use full error checking is that $totalcomments is not set at the beginning and you try to add to it. the .= command is not really a command in itself but a shortcut-- it means $a = $a.'this';, so you are adding the old value of $totalcomments to the new data, and there was no old value, so that's wrong. Anyway, to fix it you should begin with =, then use .= once it is set.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jan 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thank you.. more ?

    Thanks so much. Ok, I didn't understand what you said to do with \n. Also, would you mind looking to see if this is right:

    <?php



    $totalcomments = $totalcomments.'Company:'.$company. "\n\n";
    $totalcomments = $totalcomments.'New_or_existing:'.$new_or_existing."\n\n";
    $totalcomments = $totalcomments.'Allocated_or_pooled:'.$allocated_or_pooled."\n\n";
    $totalcomments = $totalcomments.'Profit_sharing:'.$profit_sharing."\n\n";
    $totalcomments = $totalcomments.'Profit_share_allocation_method:'.$profit_share_allocation_method."\n\n";
    $totalcomments = $totalcomments.'Employer:'.$employer."\n\n";
    $totalcomments = $totalcomments.'Number_of_employers:'.$number_of_employers."\n\n";
    $totalcomments = $totalcomments.'Name:'.$name."\n\n";
    $totalcomments = $totalcomments.'Email:'.$email."\n\n";
    $totalcomments = $totalcomments.'Phone:'.$phone."\n\n";

    $notify_email = "dave@sozopivotal.com";
    //$notify_email = "dave@sozopivotal.com";
    $notify_subject = "Thank you!";
    $notifyadmin_subject = "Request for Quote";
    $notify_user = "Thanks for the submission ";
    //$from = "dave@sozopivotal.com";
    $from = "dave@sozopivotal.com";
    $notify_message = "There is feedback";
    $visitor_message = "Thank you for requesting a quote. At Applied Plan Administrators we look forward to serving you. If you have any questions, please do not hesitate to contact us at 248.645.6145 or via email at info@appliedplan.com.
    ";

  4. #4
    Join Date
    Jan 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thank you.. more ?

    Please double check.

    Thanks soooooooo much for your help thus far!!!

    <?php



    $totalcomments = $totalcomments.'Company:'.$company. "\n\n";
    $totalcomments = $totalcomments.'New_or_existing:'.$new_or_existing."\n\n";
    $totalcomments = $totalcomments.'Allocated_or_pooled:'.$allocated_or_pooled."\n\n";
    $totalcomments = $totalcomments.'Profit_sharing:'.$profit_sharing."\n\n";
    $totalcomments = $totalcomments.'Profit_share_allocation_method:'.$profit_share_allocation_method."\n\n";
    $totalcomments = $totalcomments.'Employer:'.$employer."\n\n";
    $totalcomments = $totalcomments.'Number_of_employers:'.$number_of_employers."\n\n";
    $totalcomments = $totalcomments.'Name:'.$name."\n\n";
    $totalcomments = $totalcomments.'Email:'.$email."\n\n";
    $totalcomments = $totalcomments.'Phone:'.$phone."\n\n";

    $notify_email = "dave@sozopivotal.com";
    //$notify_email = "dave@sozopivotal.com";
    $notify_subject = "Thank you!";
    $notifyadmin_subject = "Request for Quote";
    $notify_user = "Thanks for the submission ";
    //$from = "dave@sozopivotal.com";
    $from = "dave@sozopivotal.com";
    $notify_message = "There is feedback";
    $visitor_message = "Thank you for requesting a quote. At Applied Plan Administrators we look forward to serving you. If you have any questions, please do not hesitate to contact us at 248.645.6145 or via email at info@appliedplan.com.
    ";

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Hmm... why did you post it twice in a row within one minute?

    Please use [code] tags when posting. That makes it a lot easier to read. Anyway, you use the = for the first, then .= from then on.

    Use:
    Code:
    $totalcomments = $totalcomments.'Company:'.$company. "\n\n";
    $totalcomments .= $totalcomments.'New_or_existing:'.$new_or_existing."\n\n";
    $totalcomments .= $totalcomments.'Allocated_or_pooled:'.$allocated_or_pooled."\n\n";
    $totalcomments .= $totalcomments.'Profit_sharing:'.$profit_sharing."\n\n";
    //etc
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Something else you may want to make sure of is that the variables you are calling to make up the message in $totalcomments are being assigned a value before being passed to the script. Whether it be using $_GET, $_POST, $_REQUEST, $_COOKIE, or $_SESSION, you should call your variables like this as to not get any errors.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  7. #7
    Join Date
    Jan 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi, thanks but still the same problem. I don't know what the problem is.

  8. #8
    Join Date
    Jan 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How its called out on form

    <form action="http://www.sozopivotal.com/apa/form.php" method="post" name="FormName">
    <p><strong>Company Name:</strong> <input type="text" name="company" size="24" /></p>
    <p><strong>Please describe your plan</strong><br />
    <input type="radio" name="new_or_existing" value="new" /> New<br />
    <input type="radio" name="new_or_existing" value="existing" /> Existing</p>
    <p><strong>Number of participants with balances: </strong><input type="text" name="number_of_participants" size="5" /></p>
    <p><input type="radio" name="allocated_or_pooled" value="allocated" /> Allocated Account<br />
    <input type="radio" name="allocated_or_pooled" value="pooled" /> Pooled Account</p>
    <p><input type="radio" name="profit_sharing:" value="only" /> Profit Sharing only<br />
    <input type="radio" name="profit_sharing:" value="with_401k" /> Profit Sharing with 401(k)</p>
    <p><strong>Profit Sharing Allocation Method:</strong><br />
    <input type="radio" name="profit_share_allocation_method" value="integrated" /> Integrated with Social Security<br />
    <input type="radio" name="profit_share_allocation_method" value="new_comp" /> New Comparability<br />
    <input type="radio" name="profit_share_allocation_method" value="age_weighted" /> Age Weighted</p>
    <p><input type="radio" name="employer" value="multiple" /> Multiple Employer<br />
    <input type="radio" name="employer" value="single" /> Single Employer</p>
    <p><strong>If multiple employer, number of participating employers: </strong><input type="text" name="number_of_employers" size="5" /></p>
    <p><strong>Send quote to:</strong></p>
    <p>Name: <input type="text" name="name" size="24" /></p>
    <p>Email: <input type="text" name="email" size="24" /></p>
    <p>Phone: <input type="text" name="phone" size="24" /></p>
    <input type="submit" name="submitButtonName" value="Submit">
    </form>
    <p></p>
    </td>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •