Results 1 to 13 of 13

Thread: PHP issue with mailer submission form

  1. #1
    Join Date
    Nov 2012

    PHP issue with mailer submission form

    I have a quick quote submission form on my site that is hosted by Go daddy and recently stopped working properly. It still sends the email when someone submits but the email shows up without the users information like the following:

    Phone Number:
    Number of People:

    It worked great for around 1.5 years previously and nothing has changed on the site since 2010. I checked the code and everything looks good. I really think it's a problem on the Go Daddy side since it was working fine for so long and nothing was changed but could you guys please look at the code and see if anything looks out of place. Thanks!

    Here’s the form:

    <form id=”form1″ name=”form1″ method=”post” action=”http://www.southsidelimo.com/Scripts/quickquote.php”>
    <table border=”0″ cellpadding=”6″ cellspacing=”10″>
    <td align=”right”><label for=”name”>Name:</label></td>
    <td align=”left”><input name=”name” type=”text” id=”name” size=”28″ /></td>
    <td align=”right”><label for=”email”>Email Address:</label></td>
    <td align=”left”><input name=”email” type=”text” id=”email” size=”28″ /></td>
    <td align=”right”><label for=”phone”>Phone #:</label></td>
    <td align=”left”><input name=”phone” type=”text” id=”phone” size=”28″ /></td>
    <td align=”right”><label for=”date”>Service Date:</label></td>
    <td align=”left”><input name=”date” type=”text” id=”date” size=”28″ /></td>
    <td align=”right”><label for=”occasion”>Type of Occasion:</label></td>
    <td align=”left”><input name=”occasion” type=”text” id=”occasion” size=”28″ /></td>
    <td align=”right”><label for=”people”>Number of People:</label></td>
    <td align=”left”><input name=”people” type=”text” id=”people” size=”28″ /></td>
    <td align=”right”><label for=”comments”>Details:</label></td>
    <td align=”left”><textarea name=”comments” id=”comments” cols=”22″ rows=”4″></textarea></td>
    <td align=”right”> </td>
    <td align=”left”><label for=”submit”></label>
    <input name=”submit” type=”submit” id=”submit” onclick=”MM_validateForm(‘name’,”,’R',’email’,”,’RisEmail’,'date’,”,’R',’occasion’,”,’R');return document.MM_returnValue” value=”Submit Form” /></td>

    Here's the PHP Script:

    	$emailSubject = 'Customer Quick Quote Web Request';
    	$webMaster = 'myemail@gmail.com';	
    	$nameField = $_POST['name'];	
    	$emailField = $_POST['email'];
    	$phoneField = $_POST['phone'];
    	$dateField = $_POST['date'];
    	$occasionField = $_POST['occasion'];
    	$peopleField = $_POST['people'];
    	$commentsField = $_POST['comments'];	
    	$body = <<<EOD
    Name: $name <br>
    Email: $email <br>
    Phone Number: $phone <br>
    Date: $date <br>
    Occasion: $occasion <br>
    Number of People: $people <br>
    Comments: $comments <br>
    	$headers = "From: $email\r\n";
    	$headers .= "Content-type: text/html\r\n";
    	$success = mail($webMaster, $emailSubject, $body, $headers);	
    	$theResults = <<<EOD
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Southside Limousine...</title>
    <style type="text/css">
    body {
    	background-color: #920C96;
    	background-image: url(images/bg.jpg);
    	background-repeat: repeat-x;
    	background-attachment: fixed;
    	text-align: center;
    	font-weight: bold;
    <link href="css/layout.css" rel="stylesheet" type="text/css" />
    <p>Thank you for your interest.</p>
    <p>We will contact you shortly.</p>
    <p><a href="http://www.southsidelimo.com">RETURN HOME</a></p>
    echo "$theResults";

  2. #2
    Join Date
    Nov 2012
    I have just experience the same problem with a different host. I am waiting to hear from the host if they have updated anything in the last couple of days.

  3. #3
    Join Date
    Nov 2012
    I posted on another forum and it was suggested that perhaps the PHP version was upgraded on the host and I should change the body section of the PHP code to the following:

    $body = <<<EOD
    Name: $nameField <br>
    Email: $emailField <br>
    Phone Number: $phoneField <br>
    Date: $dateField <br>
    Occasion: $occasionField <br>
    Number of People: $peopleField <br>
    Comments: $commentsField <br>
    I will test it later tonight and report back. I did speak with Go Daddy and they say nothing changed on their end so we will see what happens.

  4. #4
    Join Date
    Nov 2012
    I just heard back form my host. They just moved to a new server with latest PHP 5.4 and MySQL 5.5.

  5. #5
    Join Date
    Nov 2012
    Great, did you find out what needs to be changed to fix the issue?

  6. #6
    Join Date
    Nov 2012
    Quote Originally Posted by sslimo View Post
    Great, did you find out what needs to be changed to fix the issue?
    Not yet. Based on the fact that the problem is happening with 2 different hosts my guess is that it is something the new version of PHP (5.4.8) that just came out this month. Unfortunately, I am no expert so it is an un-educated guess.

  7. #7
    Join Date
    Nov 2012
    Someone on another forum recommended I change the body of the PHP code to the following:

    $body = <<<EOD
    Name: $nameField <br>
    Email: $emailField <br>
    Phone Number: $phoneField <br>
    Date: $dateField <br>
    Occasion: $occasionField <br>
    Number of People: $peopleField <br>
    Comments: $commentsField <br>
    I'll try it tonight and see if it works.

    BTW Go Daddy claims nothing has changed on their end in the last few months

  8. #8
    Join Date
    Nov 2012
    It appears that the problem is only occurring with <input type=text . The other types are still storing input.

  9. #9
    Join Date
    Nov 2012
    Well I figured it out. It seems if I try and include the submitted email in the body anywhere then none of the submitted data is included.

    For example if I make the body this excluding the $emailField:
    $body = <<<EOD
    Name: $nameField <br>
    Phone Number: $phoneField <br>
    Date: $dateField <br>
    Occasion: $occasionField <br>
    Number of People: $peopleField <br>
    Comments: $commentsField <br>
    it works fine and even includes the source email in the from field.

  10. #10
    Join Date
    Nov 2012
    So, did your code change recently?

  11. #11
    Join Date
    Nov 2012
    My forms are now working. It looks like our host found the problem.

  12. #12
    Join Date
    Nov 2012
    Nope code hasn't changed since 2010.

    Glad to hear you got your issue sorted out.

  13. #13
    Join Date
    Oct 2012
    I think you should update your PHPMailer version with 5.1, because there might be issues with the older at hosting sites.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.11192 seconds
  • Memory Usage 2,975KB
  • Queries Executed 15 (?)
More Information
Template Usage (34):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (5)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (13)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (13)postbit
  • (13)postbit_onlinestatus
  • (13)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (72):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates