Forms Assistance Needed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Stevo
    Second Lieutenant

    • Dec 2007
    • 102

    Forms Assistance Needed

    Could really use help in getting my forms to work properly on my just-completed site, www.irstnorcal.com. Have spent many hours attempting to do so and have perused countless forum threads on this. However, no success yet.

    The forms and pages themselves look just how I want them. I have four forms, each with their own Thank You page. For example, I have a Consultation Request form and a Thank You page. Upon clicking the Submit button, would like completed form/info emailed to my relevant address at BV and would like the sender to immediately get the Thank You page as a courtesy. (Don't believe I need an error page, but I'm open to persuasion.)

    When I click Submit, get this error message:

    Warning: file_get_contents(config_consultation_request.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/nhwtbwrs/public_html/abvfp.php on line 32

    Warning: Cannot modify header information - headers already sent by (output started at /home/nhwtbwrs/public_html/abvfp.php:32 in /home/nhwtbwrs/public_html/abvfp.php on line 304


    Any assistance anyone could provide would be most welcomed. If any other details are needed for you to look-see, kindly let me know.

    Many thanks.
  • Andy128
    Major General

    • Dec 2005
    • 2317

    #2
    Re: Forms Assistance Needed

    To save time, could you post a link to each form and cut and paste only one of the php scripts you are using. I presume that you are using the same php script just changing the email address.

    Andy
    PHP- is a blast!

    Comment

    • Stevo
      Second Lieutenant

      • Dec 2007
      • 102

      #3
      Re: Forms Assistance Needed

      Thanks, Andy.

      Here's a link to one of the forms. Once I get a handle on it I'll hopefully be able to correct the others.
      www.irstnorcal.com/consultation_request.php


      Here's script that's in the 'uploadaction.php' file:

      <?php

      // Receiving variables

      @$email = addslashes($_POST['email']);
      @$upload_Name = $_FILES['upload']['name'];
      @$upload_Size = $_FILES['upload']['size'];
      @$upload_Temp = $_FILES['upload']['tmp_name'];


      // Validation for max file size

      if ($upload_Size>0)
      {
      if( $upload_Size >1000000)
      {
      //delete file
      unlink($upload_Temp);
      header("Location: error.html");
      exit;
      }
      $uploadFile = "uploads/".$upload_Name ;

      @move_uploaded_file( $upload_Temp , $uploadFile);
      chmod($uploadFile, 0644);
      $upload_URL = "http:www.irstnorcal.com/uploads/".$upload_Name ;
      }

      //Sending Email to form owner

      $mailto = consultations@irstnorcal.com;
      $mailsubj = "Consultation Request";
      $mailhead = "From: $email\n";
      reset ($HTTP_POST_VARS);
      $mailbody = "Here's a new consultation request :\n";
      while (list ($key, $val) = each ($HTTP_POST_VARS))
      {
      if ($key!="submit")
      {
      $mailbody .= "$key : $val\n";
      }
      }
      $mailbody .= "upload: $upload_URL\n";
      mail($mailto, $mailsubj, $mailbody, $mailhead);

      header("Location: thankyou_page.html");

      ?>

      -------------------------------------------

      Uploads folder issues:
      -I did make an uploads folder within my public folder, but am unable to change permissions to 777, as I understand they should be. They appear stuck at 755.

      -What files, if any, are supposed to be in the uploads folder? The BV hosts instructions were to make that folder last, after other relevant form pages were published. Hence, it would be an empty folder, no? Do I need to move any files into it?


      Andy, can't thank you enough for taking a look. I'm new at this and the learning curve is rather steep. All assistance much appreciated.

      Steve

      Comment

      • Stevo
        Second Lieutenant

        • Dec 2007
        • 102

        #4
        Re: Forms Assistance Needed

        Also, here's script from Thank You page:

        <?PHP
        $mailto = "consultations@irstnorcal.com";
        $mailsubj = "Consultation Request";
        $mailhead = "From: $email\n";
        reset ($HTTP_POST_VARS);
        $mailbody = "Values submitted from web site form :\n";
        while (list ($key, $val) = each ($HTTP_POST_VARS))
        {
        if ($key!="submit")
        {

        -------------------------------

        Again, thank you.

        Steve

        Comment

        • Watdaflip
          Major General

          • Sep 2005
          • 2116

          #5
          Re: Forms Assistance Needed

          The reason you are getting the " Warning: Cannot modify header information - headers already sent by " error is most likely caused by you having some sort of html code before the form. You need to remove it or place the php script above in the file.

          You shouldn't have the script on the thank you page. According to your script the email was already send on "uploadaction.php"

          The other error isn't caused by anything I can see in the code you posted

          Register/Login Script
          Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

          Comment

          • Stevo
            Second Lieutenant

            • Dec 2007
            • 102

            #6
            Re: Forms Assistance Needed

            Replies much appreciated. Will attempt to correct, per your guidance.

            Again, thank you!

            Comment

            • navaldesign
              General & Forum Moderator

              • Oct 2005
              • 12080

              #7
              Re: Forms Assistance Needed

              Well, you have mixed 3 different scripts!

              The one in yoyr first post is from the OLD, deprecated version of ABVFP. It is not supported anymore, you can, though, download the new version, here. However, this message probably has nothing to do with ABVFP itself: you have mistaken the form action, you have placed there "abvp.php" instead of "abvfp.php" I am talking about your http://www.irstnorcal.com/consultation_request.php page. So, it results in a Not found error.
              If you have actually installed ABVFP (the old version) the error message you get (as per your first post) indicates that ABVFP has been uploaded on the site but the form has not been configured in ABVFP. In fact, the file config_consultation_request.php is created by the script when you set up your form, and in your case it is missing, which means that you have not set up the form. The next error is a consequense of the first one, not of any html present before the "header" command.
              If you go on using ABVFP (either the old or the new version) you NEED an error page because ABVFP performs user input validation and reports error in this error page. If no error page is present, the script will NOT work properly (it will crash) if any errors are found.



              The second one (in your second post) is from the Upload a file using a Form tutorial, here in the forum. This one is supposed to also upload a file (if the user actually uploads a file). Setting the "uploads" folder permissions to 777 is necessary for the script to work, however the folder will be initially empty, it will be in the future populated with the files that will be uploaded in your site by users.

              The script seems correct, but i don't see how it can ever work, since the form action is NOT set to send the form info to this script.

              The third one, in your Thank you page, is the script from the Forms Tutorial part 1. You DON'T need this script pasted in the THANK YOU page, if you use either ABVFP or the second script. In these two cases, the thnak you page is a simple HTML page with a thanking message, nothing more.

              I believe that if you need file uploads etc, the best solution is the new version of ABVFP. Download it, install it and you will not regret it.
              Navaldesign
              Logger Lite: Low Cost, Customizable, multifeatured Login script
              Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
              DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
              Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

              Comment

              • Stevo
                Second Lieutenant

                • Dec 2007
                • 102

                #8
                Re: Forms Assistance Needed

                Naval and Watdaflip, thanks to you both for taking your valuable time to look over my problem. I've followed Naval's advice (grazie!) and installed ABVFP v2. And, the accompanying tutorial was much appreciated. I believe I've now resolved all conflicts for my five forms, with one exception: After clicking Submit button, it goes here...

                to the DB Technosystems' Advanced Blue Voda Form Administrator loggin page(!), instead of to one of the pertinent Thank You pages I've created. This occurs on all the forms. No doubt something I've done wrong and that I'm now unable to find the error, despite quite vigorous attempts at trying to do so.

                Website: http://www.irstnorcal.com
                A form example is:


                I'm pleased to have come this far, thanks to your fine assistance. Once I solve this problem, I believe I'll be in good shape. Thank you for any additional suggestions or guidance you may offer in this regard. If you need any other details, kindly let me know.

                Steve

                Comment

                • navaldesign
                  General & Forum Moderator

                  • Oct 2005
                  • 12080

                  #9
                  Re: Forms Assistance Needed

                  Your form in http://www.irstnorcal.com/consultation_request.php has the hidden field named "formid" instead of "Formid" . Edit it, save, publish, refresh your browser and test. If the problem persists, please post back.
                  Navaldesign
                  Logger Lite: Low Cost, Customizable, multifeatured Login script
                  Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                  DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                  Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                  Comment

                  • Stevo
                    Second Lieutenant

                    • Dec 2007
                    • 102

                    #10
                    Re: Forms Assistance Needed

                    Naval,

                    Again, thanks much. I followed your instructions and made corrections. I'm getting there! However, now when I click Submit, it goes to-

                    and I get the IE HTTP 404 error page...Page cannot be found.

                    It should go to the following Thank You page:


                    Any and all suggestions would be most welcomed. Thank you.

                    Steve

                    Comment

                    • navaldesign
                      General & Forum Moderator

                      • Oct 2005
                      • 12080

                      #11
                      Re: Forms Assistance Needed

                      You must have some further mistake, unfortunately without access to your ABVFP i can't say what else can be wrong. If you wish, use my contact form to send me your ABVFP login details and i will have a look.
                      Navaldesign
                      Logger Lite: Low Cost, Customizable, multifeatured Login script
                      Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                      DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                      Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                      Comment

                      • Stevo
                        Second Lieutenant

                        • Dec 2007
                        • 102

                        #12
                        Re: Forms Assistance Needed

                        Naval,

                        I've just submitted your contact for with login details.

                        Thank you!

                        Steve

                        Comment

                        • navaldesign
                          General & Forum Moderator

                          • Oct 2005
                          • 12080

                          #13
                          Re: Forms Assistance Needed

                          Seems like the details you sent me are incorrect. Please check and submit again.
                          Navaldesign
                          Logger Lite: Low Cost, Customizable, multifeatured Login script
                          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                          Comment

                          Working...
                          X