Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Sep 2003
    Location
    South Florida
    Posts
    3
    Member #
    3244
    Thanks in advance for any help.

    http://www.bioprodental.com/register.html and
    http://www.bioprodental.com/order.html

    both of these pages contain forms that refer to php files located in the root directory on server host.

    attached file mail.php is for the register.html page and
    order_process.php is for the order.html page and is not attached.
    I will attach with subsequent thread should someone that can help need to review this file.

    I have double checked that hosting is configured properly with my ISP
    as well as that mail account is operative and matches programming.

    My mail program POPs the mail server just fine.

    None of the fields within the forms on these two pages require text for submittal yet both pages error out with the } else echo "There was error while sending the mail."

    I am stumped. I cannot figure out why the form won't make it through the mail server.

  2.  

  3. #2
    Junior Member
    Join Date
    Sep 2003
    Location
    South Florida
    Posts
    3
    Member #
    3244
    Finally Figured this one out! Programming is about details.

    At first glance of the code, the post method, as it refers to the field data and the e-mail address all look good. The problem turned out to be this. Strictly speaking the code is correct however, as a last ditch attempt I altered the location for the page that loads after the text e-mail is ordered to go out. changing the file name for the page that loads from "order.html to "http://www.bioprodental.com/order.html" This shouldn't have made any difference because according to PHP the root directory is the default location anyway for the page file retrieval. It did work because the script requires both the e-mail submittal and the page load to be successful or the } else "There was an error. message occurs. Our hosting provider claims that the hosting plan supports php, perl, asp, cgi etc.. and I beleive them. I think that they may have integrated unix firmware that may act as support programs that process file server to mail server requests and this "software was not processing the php file commands correctly.

    Although I am 99% sure that this is the problem because altering the location file name remedied the problem, it does not explain 2 other sites where I have similar forms running under the exact same hosting plans and their code is exactly the same and does not error out.

    This was a tough one because you would never guess that server platforms might have support software running that interferes with server side processing and or dictates sequencing that is contrary to mail server receipt requirements. FOLLOW THAT.

    I welcome any comments.

  4. #3
    Senior Member james's Avatar
    Join Date
    May 2003
    Location
    Melbourne, AUSTRALIA
    Posts
    364
    Member #
    1352
    Don't you want to send the email to the person's email address...
    PHP Code:
    mail($email$subject$body"From: [email]info@bioprodental.com[/email]"
    Instead of
    PHP Code:
    mail("info@bioprodental.com"$subject$body"From: [email]info@bioprodental.com[/email]"
    The first parameter is the to address.
    James H
    Home Page · Mars Page · www.fihsf1.net (formerly www·fihs·net)

  5. #4
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    Isn't it something like this? :
    PHP Code:
    $headers "From: [email]info@bioprodental.com[/email]\r\n";
    mail("info@bioprodental.com, $subject$body$headers); 
    I mean that there must be a \r\n after the line... maybe not.

  6. #5
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Only if it contains multiple/multiline headers
    S. Rosland

  7. #6
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    I recommend to put this:
    PHP Code:
    $body "Email Address:\t$email\nName:\t\t\t$first_name $last_name\nPhone Number:\t$phone\nLicense Number:\t$license"
    Like this:
    PHP Code:
    $body "Email Address: {$email}\n Name:{$first_name} {$last_name}\n Phone Number:{$phone}\n License Number: {$license}"
    Maybe that helps

  8. #7
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    This should work.
    Hope it helps


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:31 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com