Form help

Discussion in 'PHP' started by drew68, Jan 18, 2007.

  1. #1
    gosh where do i start. my friend had the original formMail.php file on his server and i moved it over to my server.

    the form is located here http://www.ccgia.org/formMail.php and it's not submitting.

    it's php run.

    can someone help me figure this out?

    when i click submit it should go to this page http://www.ccgia.org/thank_you.html.

    thanks guys
     
    drew68, Jan 18, 2007 IP
  2. koolasia

    koolasia Banned

    Messages:
    1,413
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i think we will need ur formMail.php code to help u out
     
    koolasia, Jan 18, 2007 IP
  3. West

    West Peon

    Messages:
    79
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    We will definitely need to see the code.

    Post the code in between the PHP code in between the php tags.

     
    West, Jan 18, 2007 IP
  4. technoguy

    technoguy Notable Member

    Messages:
    4,369
    Likes Received:
    306
    Best Answers:
    0
    Trophy Points:
    205
    #4
    If you post your php code here , i can complete it within few mins. Thank you.
     
    technoguy, Jan 18, 2007 IP
  5. drew68

    drew68 Well-Known Member

    Messages:
    582
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    128
    #5
    the way my friend did this originally...he placed the html code for the entire page along with the php and called it formMail.php. you can view the source code for the form page. but here's the formMail.php file...

    <?php
    $emptyStr = true;
    $uNameErr = true;
    }

    if(empty($_POST["agency"])){
    $emptyStr = true;
    $agencyErr = true;
    }
    if(empty($_POST["position"])){
    $emptyStr = true;
    $positionErr = true;
    }
    if(empty($_POST["address"])){
    $emptyStr = true;
    $addressErr = true;
    }
    if(empty($_POST["city"])){
    $emptyStr = true;
    $cityErr = true;
    }
    if(empty($_POST["state"])){
    $emptyStr = true;
    $stateErr = true;
    }
    if(empty($_POST["country"])){
    $emptyStr = true;
    $countryErr = true;
    }
    if(empty($_POST["phone"])){
    $emptyStr = true;
    $phoneErr = true;
    }
    else
    {
    $myPhone = $_POST["student"];
    }
    if(empty($_POST["amount"])){
    $emptyStr = true;
    $amountErr = true;
    }
    else
    {
    $myAmount = $_POST["amount"];

    }
    if(empty($_POST["student"])){
    $emptyStr = true;
    $studentErr = true;
    }
    else
    {
    $myStudent = $_POST["student"];
    }
    if(empty($_POST["comment"])){
    $emptyStr = true;
    $commentErr = true;
    }
    else{
    if (strlen($_POST["comment"]) > 800)
    $myComment = substr($_POST["comment"],0,800);
    else
    $myComment = $_POST["comment"];

    }
    if(!$emptyStr)
    {
    $admin_email = 'info@ccgia.org';
    $headers1 = "From: " ;
    $sub1 = 'New comment (CCGI)';
    $message1 = 'Name : ' .$_POST["uName"] ."\r\n";
    $message1 .= 'Agency: '.$_POST["agency"] ."\r\n";
    $message1 .= 'Position: '.$_POST["position"] ."\r\n";
    $message1 .= 'Address: '.$_POST["address"] ."\r\n";
    $message1 .= 'City: '.$_POST["city"] ."\r\n";
    $message1 .= 'State: '.$_POST["state"] ."\r\n";
    $message1 .= 'Country: '.$_POST["county"] ."\r\n";
    $message1 .= 'Phone: '.$_POST["phone"] ."\r\n";
    $message1 .= 'Amount: '.$myAmount ."\r\n";
    $message1 .= 'Student: '.$myStudent ."\r\n";
    $message1 .= 'Comment: '.$myComment ."\r\n";
    mail ($admin_email, $sub1, $message1, $headers1);
    header("Location: http://www.ccgia.org/thank_you.html");
    exit;
    }
    }
    ?>
     
    drew68, Jan 18, 2007 IP
  6. drew68

    drew68 Well-Known Member

    Messages:
    582
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    128
    #6
    can someone help me with this?
     
    drew68, Jan 20, 2007 IP