The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 7 of 7

Thread: PHP contact form problem

  1. #1

    PHP contact form problem

    Hello! I followed your PHP contact form tutorial. It was working great on my test server. It has been moved to the clients server and it is having some problems when some of the radio and boxes aren't checked. It's a monster form - any help on this would be appreciated!!!!

    Here is the form: http://www.lvgraphics.net/quote.html
    Here is the PHP file: http://www.lvgraphics.net/mailer.php

    THank you!!!!

  2. #2

  3. #3
    You have to turn the warnings off apache on the server off. There is a notice at the bottom that the form was submitted so it seems to be doing what it has to. I'm not sure exactly how to do it but it's something in the apache config files.

    I think you'll find it in the documentation here somewhere....

  4. #4

    Thanks for the replys

    I'm attaching the files.
    I believe it is a server issue, I'm in contact with their host company and they are getting back to me. However if you notice any issues with the files, or advice, I would appreciate it. New to PHP.

    Thanks!
    Attached Files Attached Files

  5. #5
    it's pretty unlikely anyone's going to open up your zip. on the other hand, if you post your code within [php]the code[/php] tags, it's highly likely someone will look at it.

  6. #6

    code

    OK, the php code is below. Like I said, when some of the radio buttons or checkboxes are left blank it gives off warnings and doesn't send on one server, but does on another. I'll probably be able to resolve this with the hosting company, but any tips with the code itself would be great.

    Thanks!

    PHP Code:
     
    <?php 
    if(isset($_POST['submit'])) { 
    $to "kirk@lvgraphics.net"
    $subject "Web Form Submission"
    $name_field $_POST['name']; 
    $company_field $_POST['company'];
    $address_field $_POST['address'];
    $city_field $_POST['city'];
    $state_field $_POST['state'];
    $zip_field $_POST['zip'];
    $email_field $_POST['email'];
    $phone_field $_POST['phone'];
    $fax_field $_POST['fax'];
    $jobinfo $_POST['jobinfo']; 
    $jobnumber $_POST['jobnumber'];
    $reprint_job $_POST['reprintjob'];
    $est_field $_POST['est_duedate'];
    $dd_field $_POST['deliverydate'];
    $qty_field $_POST['quantity'];
    $qtypages_field $_POST['qty_pages'];
    $selfcover_radio $_POST['selfcover_radio'];
    $plus_field $_POST['plus'];
    $bleed_radio $_POST['bleed_radio'];
    $cover_field $_POST['cover_flatsize']; 
    $foldedsize_field $_POST['foldedsize']; 
    $stock_field $_POST['stock']; 
    $cover_weight $_POST['cover_weight'];
    $colors_field $_POST['colors'];
    $varnish_radio $_POST['varnish_radio'];
    $varnish2_radio $_POST['varnish2_radio'];
    $aqueous_radio $_POST['aqueous_radio']; 
    $texts_field $_POST['text_flatsize']; 
    $textfs_field $_POST['text_foldedsize']; 
    $textstock_field $_POST['text_stock']; 
    $text_weight $_POST['text_weight'];
    $colors2 $_POST['colors2'];
    $varnish3_radio $_POST['varnish3_radio'];
    $varnish4_radio $_POST['varnish4_radio'];
    $aqueous2_radio $_POST['aqueous2_radio']; 
    $insertfs_field $_POST['insert_flatsize'];
    $insertfold_field $_POST['insert_foldedsize'];
    $insertstock_field $_POST['insert_stock']; 
    $insert_weight $_POST['insert_weight']; 
    $colors3 $_POST['colors3'];
    $varnish5_radio $_POST['varnish5_radio'];
    $varnish6_radio $_POST['varnish6_radio'];
    $aqueous3_radio $_POST['aqueous3_radio']; 
    $insertinst_field $_POST['insert_instruct'];
    $supplied_radio_radio $_POST['supplied_radio']; 
    $corrections_field $_POST['numberofcorrections'];
    $scans_field $_POST['numberofscans'];
    $scan_radio $_POST['scan_radio'];
    $proofing_radio $_POST['proofing_radio'];
    $option $_POST['radio']; 
    $padin_field $_POST['padin'];
    $diecut_field $_POST['diecut_descript'];
    $emboss_field $_POST['emboss_descript'];
    $foilstamp_field $_POST['foilstamp_descript'];
    $pack_radio $_POST['pack_radio']; 
    $pack_radio2 $_POST['pack_radio2']; 
    $shirnkwrap_field $_POST['shrink_wrap'];
    $pack_radio3 $_POST['pack_radio3']; 
    $rubberband_field $_POST['rubber_band'];
    $altname_field $_POST['alt_name'];
    $altcompany_field $_POST['alt_company'];
    $altaddress_field $_POST['alt_address'];
    $city2_field $_POST['city2'];
    $state2_field $_POST['state2'];
    $zip2_field $_POST['zip2'];
    $ship_special $_POST['ship_special'];
    foreach(
    $_POST['check'] as $value) { 
    $check_msg .= "Checked: $value\n"

     
    $body "From: $name_field\n Company Name: $company_field\n Adress: $address_field\n City: $city_field\n State: $state_field\n Zip Code: $zip_field\n E-Mail: $email_field\n Phone Number: $phone_field\n Fax Number: $fax_field\n \n JOB INFORMATION:\n $jobinfo\n Revision of Job Number: $jobnumber\n Reprint Job Number: $reprint_job\n Estimate Due: $est_field\n Delivery Date: $dd_field\n Quantity: $qty_field\n \n LAYOUT\n Number of Pages: $qtypages_field\n $selfcover_radio\n Plus: $plus_field\n Bleed: $bleed_radio\n \n COVER\n Flat Size: $cover_field\n Folded Size: $foldedsize_field\n Stock: $stock_field\n Weight: $cover_weight\n Colors per Side: $colors_field\n Varnish: $varnish_radio\n $varnish2_radio\n Aqueous Coat: $aqueous_radio\n \n TEXT\n Flat Size: $texts_field\n Folded Size: $textfs_field\n Stock: $textstock_field\n Weight: $text_weight\n Colors per Side: $colors2\n 
    Varnish: 
    $varnish3_radio\n $varnish4_radio\n Aqueous Coat: $aqueous2_radio\n \n INSERT\n Flat Size: $insertfs_field\n Folded Size: $insertfold_field\n Stock: $insertstock_field\n Weight: $insert_weight\n Colors per Side: $colors3_field\n Varnish: $varnish5_radio\n $varnish6_radio\n Aqueous Coat: $aquesous3_radio\n Special Instructions: $insertinst_field\n \n ELECTRONIC PREPESS \n $supplied_radio\n Number of Corrections Needed: $corrections_field\n Number of Scans: $scans_field\n Halftones or Color Spes: $scan_radio\n \n Proofing: \n $proofing_radio\n \n BINDERY: \n $check_msg\n Laminate: $option\n Pad In: $padin_field\n Diecut Description: $diecut_field\n Emboss Description: $emboss_field\n Foil Stamp Description: $foilstamp_field\n \n PACKAGING\n $pack_radio\n $pack_radio2\n $shirnkwrap_field\n $pack_radio3\n $rubberband_field\n  \n ALTERNATE SHIP TO: \n Alt Name: $altname_field\n Alt Company: $altcompany_field\n Alt Address: $altaddress_field\n Alt City: $city2_field/n State: $state2_field\n Zip: $zip2_field\n Shipping Instructions: $ship_special\n"
     
    echo 
    "Data has been submitted to $to!"
    mail($to$subject$body); 
    } else { 
    echo 
    "Error!"

    ?>

  7. #7
    try doing something like this for each of the radio and check boxes:

    PHP Code:
    $varnish5_radio = isset($_POST['varnish5_radio']) ? $_POST['varnish5_radio']) : ""
    Look at yourself in the mirror and ask... have I met you before?

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
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012