Announcement

Collapse
No announcement yet.

Is there a tutorial for php script for Form here ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    Re: Is there a tutorial for php script for Form here ?

    Originally posted by navaldesign
    I know, just had lots to do and your script is QUITE complicated. I'll play with it tomorrow morning. Sorry.
    No problem! Major General,
    I was just worried about where had you been. :)
    Do you think, I had learnt something from you about the second scripts that I wrote myself, even there's still some mistake?
    Everything has to be learnt, even about transfering account to Vodahost.
    Regards,
    WS_Blue

    Comment


    • #47
      Re: Is there a tutorial for php script for Form here ?

      Originally posted by navaldesign
      I know, just had lots to do and your script is QUITE complicated. I'll play with it tomorrow morning. Sorry.
      Hi! Naval,
      How are you? Sorry to bother you again.
      If you're too busy to do below scripts for me, could you PLEASE tell me, the mistake that I made, so I can try to correct them myself.
      http://www.beruang.biz/formulir.htm (Form)

      And also script about, How to limit sizes of photos and make it A MUST in order to complete the form otherwise will go to error page.
      Thank you so much for all the help.
      WS_Blue
      .................................................. .................................................
      <?php
      // Receiving variables
      @$agtnamalengkap = addslashes($_POST['agtnamalengkap']);
      @$agtktpnomor = addslashes($_POST['agtktpnomor']);
      @$agtktpdikeluarkan = addslashes($_POST['agtktpdikeluarkan']);
      @$agtktpberlaku = addslashes($_POST['agtktpberlaku']);
      @$agttanggallahir = addslashes($_POST['agttanggallahir']);
      @$agtbulanlahir = addslashes($_POST['agtbulanlahir']);
      @$agttahunlahir = addslashes($_POST['agttahunlahir']);
      @$agtalamatjalan = addslashes($_POST['agtalamatjalan']);
      @$agtalamatkota = addslashes($_POST['agtalamatkota']);
      @$agtalamatpropinsi = addslashes($_POST['agtalamatpropinsi']);
      @$agtalamatkodepos = addslashes($_POST['agtalamatkodepos']);
      @$agttelhp = addslashes($_POST['agttelhp']);
      @$agtemail = addslashes($_POST['agtemail']);
      @$agtsimnomor = addslashes($_POST['agtsimnomor']);
      @$agtsimjenis = addslashes($_POST['agtsimjenis']);
      @$agtsimdikeluarkan = addslashes($_POST['agtsimdikeluarkan']);
      @$agtsimberlaku = addslashes($_POST['agtsimberlaku']);
      @$kerjanamaperusahaan = addslashes($_POST['kerjanamperusahaan']);
      @$kerjajenisusaha = addslashes($_POST['kerjajenisusaha']);
      @$kerjaalamatjalan = addslashes($_POST['kerjaalamatjalan']);
      @$kerjaalamatkota = addslashes($_POST['kerjaalamatkota']);
      @$kerjaalamatpropinsi = addslashes($_POST['kerjaalamatpropinsi']);
      @$kerjaalamatkodepos = addslashes($_POST['kerjaalamatkodepos']);
      @$kerjatel = addslashes($_POST['kerjatel']);
      @$kenmerktype = addslashes($_POST['kenmerktype']);
      @$kenjenismodel = addslashes($_POST['kenjenismodel']);
      @$kentahunpembuatan = addslashes($_POST['kentahunpembuatan']);
      @$kenkondisimesin = addslashes($_POST['kenkondisimesin']);
      @$kenkondisibody = addslashes($_POST['kenkondisibody']);
      @$kenalamatjalan = addslashes($_POST['kenalamatjalan']);
      @$kenalamatkota = addslashes($_POST['kenalamatkota']);
      @$kenalamatpropinsi = addslashes($_POST['kenalamatpropinsi']);
      @$kenalamatkodepos = addslashes($_POST['kenalamatkodepos']);
      @$kentelpemilikken = addslashes($_POST['kentelpemilikken']);
      @$kenkmperbulan = addslashes($_POST['kenkmperbulan']);
      @$kenkeperluanken = addslashes($_POST['kenkeperluanken']);
      @$kenjalandilalui = addslashes($_POST['kenjalandilalui']);
      @$kenluarkota = addslashes($_POST['kenluarkota']);
      @$kenkotatujuan = addslashes($_POST['kenkotatujuan']);
      // Validation
      if (strlen($agtnamalengkap) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agtktpnomor) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agtktpdikeluarkan) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agtktpberlaku) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agttanggallahir) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agtbulanlahir) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agttahunlahir) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agtalamatjalan) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agtalamatkota) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agtalamatpropinsi) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agttelhp) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agtemail) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agtsimnomor) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($agtsimjenis) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($simdikeluarkan) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($simberlaku) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kerjanamaperusahaan) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($jenisusaha) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kerjaalamatjalan) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kerjaalamatkota) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kerjaalamatpropinsi) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kerjatel) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kenmerktype) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kenjenismodel) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kentahunpembuatan) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kenkondisimesin) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kenkondisibody) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kenkmperbulan) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kenkeperluanken) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      if (strlen($kenjalandilalui) == 0 )
      {
      header("Location: error.htm");
      exit;
      }
      //Sending Email to form owner
      $pfw_header = "From: $agtemail\n"
      . "Reply-To: $agtemail\n";
      $pfw_subject = "Formulir Anggota";
      $pfw_email_to = "neocon2000******.com";
      $pfw_message = "agtnamalengkap: $agtnamalengkap\n"
      ."agtktpnomor: $agtktpnomor\n"
      ."agtktpdikeluarkan: $agtktpdikeluarkan\n"
      ."agtktpberlaku: $agtktpberlaku\n"
      ."agttanggallahir: $agttanggallahir\n"
      ."agtbulanlahir: $agtbulanlahir\n"
      ."agttahunlahir: $agttahunlahir\n"
      ."agtalamatjalan: $agtalamatjalan\n"
      ."agtalamatkota: $agtalamatkota\n"
      ."agtalamatpropinsi: $agtalamatpropinsi\n"
      ."agtalamatkodepos: $agtalamatkodepos\n"
      ."agttelhp: $agttelhp\n"
      ."agtemail: $agtemail\n"
      ."agtsimnomor: $agtsimnomor\n"
      ."agtsimjenis: $agtsimjenis\n"
      ."agtsimdikeluarkan: $agtsimdikeluarkan\n"
      ."agtsimberlaku: $agtsimberlaku\n"
      ."kerjanamaperusahaan: $kerjanamperusahaan\n"
      ."kerjajenisusaha: $kerjajenisusaha\n"
      ."kerjaalamatjalan: $kerjaalamatjalan\n"
      ."kerjaalamatkota: $kerjaalamatkota\n"
      ."kerjaalamatpropinsi: $kerjaalamatpropinsi\n"
      ."kerjaalamatkodepos: $kerjaalamatkodepos\n"
      ."kerjatel: $kerjatel\n"
      ."kenmerktype: $kenmerktype\n"
      ."kenjenismodel: $kenjenismodel\n"
      ."kentahunpembuatan: $kentahunpembuatan\n"
      ."kenkondisimesin: $kenkondisimesin\n"
      ."kenkondisibody: $kenkondisibody\n"
      ."kenalamatjalan: $kenalamatjalan\n"
      ."kenalamatkota: $kenalamatkota\n"
      ."kenalamatpropinsi: $kenalamatpropinsi\n"
      ."kenalamatkodepos: $kenalamatkodepos\n"
      ."kentelpemilikken: $kentelpemilikken\n"
      ."kenkmperbulan: $kenkmperbulan\n"
      ."kenkeperluanken: $kenkeperluanken\n"
      ."kenjalandilalui: $kenjalandilalui\n"
      ."kenluarkota: $kenluarkota\n"
      ."kenkotatujuan: $kenkotatujuan\n"
      *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
      header("Location: confirmation.htm");
      ?>

      Comment


      • #48
        Re: Is there a tutorial for php script for Form here ?

        Here is your script:

        <?php
        // Receiving variables
        @$agtnamalengkap = addslashes($_POST['agtnamalengkap']);
        @$agtktpnomor = addslashes($_POST['agtktpnomor']);
        @$agtktpdikeluarkan = addslashes($_POST['agtktpdikeluarkan']);
        @$agtktpberlaku = addslashes($_POST['agtktpberlaku']);
        @$agttanggallahir = addslashes($_POST['agttanggallahir']);
        @$agtbulanlahir = addslashes($_POST['agtbulanlahir']);
        @$agttahunlahir = addslashes($_POST['agttahunlahir']);
        @$agtalamatjalan = addslashes($_POST['agtalamatjalan']);
        @$agtalamatkota = addslashes($_POST['agtalamatkota']);
        @$agtalamatpropinsi = addslashes($_POST['agtalamatpropinsi']);
        @$agtalamatkodepos = addslashes($_POST['agtalamatkodepos']);
        @$agttelhp = addslashes($_POST['agttelhp']);
        @$agtemail = addslashes($_POST['agtemail']);
        @$agtsimnomor = addslashes($_POST['agtsimnomor']);
        @$agtsimjenis = addslashes($_POST['agtsimjenis']);
        @$agtsimdikeluarkan = addslashes($_POST['agtsimdikeluarkan']);
        @$agtsimberlaku = addslashes($_POST['agtsimberlaku']);
        @$kerjanamaperusahaan = addslashes($_POST['kerjanamaperusahaan']);
        @$kerjajenisusaha = addslashes($_POST['kerjajenisusaha']);
        @$kerjajenispekerjaan = addslashes($_POST['kerjajenispekerjaan']);
        @$kerjalamabekerja = addslashes($_POST['kerjalamabekerja']);
        @$kerjalamatjalan = addslashes($_POST['kerjalamatjalan']);
        @$kerjaalamatkota = addslashes($_POST['kerjaalamatkota']);
        @$kerjaalamatpropinsi = addslashes($_POST['kerjaalamatpropinsi']);
        @$kerjaalamatkodepos = addslashes($_POST['kerjaalamatkodepos']);
        @$kerjatel = addslashes($_POST['kerjatel']);
        @$kenmerktype = addslashes($_POST['kenmerktype']);
        @$kenjenismodel = addslashes($_POST['kenjenismodel']);
        @$kentahunpembuatan = addslashes($_POST['kentahunpembuatan']);
        @$kenkondisimesin = addslashes($_POST['kenkondisimesin']);
        @$kenalamatjalan = addslashes($_POST['kenalamatjalan']);
        @$kenalamatkota = addslashes($_POST['kenalamatkota']);
        @$kenalamatpropinsi = addslashes($_POST['kenalamatpropinsi']);
        @$kenalamatkodepos = addslashes($_POST['kenalamatkodepos']);
        @$kentelpemilikken = addslashes($_POST['kentelpemilikken']);
        @$kenkmperbulan = addslashes($_POST['kenkmperbulan']);
        @$kenkeperluanken = addslashes($_POST['kenkeperluanken']);
        @$kenjalandilalui = addslashes($_POST['kenjalandilalui']);
        @$kenluarkota = addslashes($_POST['kenluarkota']);
        @$kenkotatujuan = addslashes($_POST['kenkotatujuan']);
        @$fotomobil_Name = $_FILES['fotomobil']['name'];
        @$fotomobil_Size = $_FILES['fotomobil']['size'];
        @$fotomobil_Temp = $_FILES['fotomobil']['tmp_name'];
        @$fotomobil_Mime_Type = $_FILES['fotomobil']['type'];
        @$fotomobil1_Name = $_FILES['fotomobil1']['name'];
        @$fotomobil1_Size = $_FILES['fotomobil1']['size'];
        @$fotomobil1_Temp = $_FILES['fotomobil1']['tmp_name'];
        @$fotomobil1_Mime_Type = $_FILES['fotomobil1']['type'];
        function RecursiveMkdir($path)
        {
        if (!file_exists($path))
        {
        RecursiveMkdir(dirname($path));
        mkdir($path, 0777);
        }
        }
        // Validation
        if (strlen($agtnamalengkap) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if (strlen($agtktpnomor) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if (strlen($agttanggallahir) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if (strlen($agtbulanlahir) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if (strlen($agttahunlahir) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if (strlen($agttelhp) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if (strlen($agtemail) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if (strlen($agtsimnomor) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if (strlen($kenmerktype) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if (strlen($kentahunpembuatan) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if (strlen($fotomobil) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if( $fotomobil_Size == 0)
        {
        header("Location: errorpage.html");
        exit;
        }
        if (strlen($fotomobil) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if( $fotomobil_Size >10000)
        {
        //delete file
        unlink($fotomobil_Temp);
        header("Location: errorpage.html");
        exit;
        }
        $uploadFile = "upload/".$fotomobil_Name ;
        if (!is_dir(dirname($uploadFile)))
        {
        @RecursiveMkdir(dirname($uploadFile));
        }
        else
        {
        @chmod(dirname($uploadFile), 0777);
        }
        @move_uploaded_file( $fotomobil_Temp , $uploadFile);
        chmod($uploadFile, 0644);
        $fotomobil_URL = "http://www.beruang.biz/upload/".$fotomobil_Name ;

        if (strlen($fotomobil1) == 0 )
        {
        header("Location: errorpage.html");
        exit;
        }
        if( $fotomobil1_Size == 0)
        {
        header("Location: errorpage.html");
        exit;
        }
        if( $fotomobil1_Size >10000)
        {
        //delete file
        unlink($fotomobil1_Temp);
        header("Location: errorpage.html");
        exit;
        }
        $uploadFile = "upload/".$fotomobil1_Name ;
        if (!is_dir(dirname($uploadFile)))
        {
        @RecursiveMkdir(dirname($uploadFile));
        }
        else
        {
        @chmod(dirname($uploadFile), 0777);
        }
        @move_uploaded_file( $fotomobil1_Temp , $uploadFile);
        chmod($uploadFile, 0644);
        $fotomobil1_URL = "http://www.beruang.biz/upload/".$fotomobil1_Name ;
        //Sending Email to form owner
        $pfw_header = "From: $agtemail\n"
        . "Reply-To: $agtemail\n";
        $pfw_subject = "Put your subject here";
        $pfw_email_to = "youremail@yourdomain.com";
        $pfw_message = "agtnamalengkap: $agtnamalengkap\n"
        . "agtktpnomor: $agtktpnomor\n"
        . "agtktpdikeluarkan: $agtktpdikeluarkan\n"
        . "agtktpberlaku: $agtktpberlaku\n"
        . "agttanggallahir: $agttanggallahir\n"
        . "agtbulanlahir: $agtbulanlahir\n"
        . "agttahunlahir: $agttahunlahir\n"
        . "agtalamatjalan: $agtalamatjalan\n"
        . "agtalamatkota: $agtalamatkota\n"
        . "agtalamatpropinsi: $agtalamatpropinsi\n"
        . "agtalamatkodepos: $agtalamatkodepos\n"
        . "agttelhp: $agttelhp\n"
        . "agtemail: $agtemail\n"
        . "agtsimnomor: $agtsimnomor\n"
        . "agtsimjenis: $agtsimjenis\n"
        . "agtsimdikeluarkan: $agtsimdikeluarkan\n"
        . "agtsimberlaku: $agtsimberlaku\n"
        . "kerjanamaperusahaan: $kerjanamaperusahaan\n"
        . "kerjajenisusaha: $kerjajenisusaha\n"
        . "kerjajenispekerjaan: $kerjajenispekerjaan\n"
        . "kerjalamabekerja: $kerjalamabekerja\n"
        . "kerjalamatjalan: $kerjalamatjalan\n"
        . "kerjaalamatkota: $kerjaalamatkota\n"
        . "kerjaalamatpropinsi: $kerjaalamatpropinsi\n"
        . "kerjaalamatkodepos: $kerjaalamatkodepos\n"
        . "kerjatel: $kerjatel\n"
        . "kenmerktype: $kenmerktype\n"
        . "kenjenismodel: $kenjenismodel\n"
        . "kentahunpembuatan: $kentahunpembuatan\n"
        . "kenkondisimesin: $kenkondisimesin\n"
        . "kenalamatjalan: $kenalamatjalan\n"
        . "kenalamatkota: $kenalamatkota\n"
        . "kenalamatpropinsi: $kenalamatpropinsi\n"
        . "kenalamatkodepos: $kenalamatkodepos\n"
        . "kentelpemilikken: $kentelpemilikken\n"
        . "kenkmperbulan: $kenkmperbulan\n"
        . "kenkeperluanken: $kenkeperluanken\n"
        . "kenjalandilalui: $kenjalandilalui\n"
        . "kenluarkota: $kenluarkota\n"
        . "kenkotatujuan: $kenkotatujuan\n"
        . "fotomobil: $fotomobil_URL\n";
        *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
        header("Location: thankyoupage.html");
        ?>


        Copy the code, paste it in Notepad, change the email address and the subject, and put (if you want) separate errorpages for each kind of error. Create also a "thankyoupage". Goto to "Save as", choose file type "All files", save it with the name "formulir.php" and upload it on your site using FTP. Using FTP create a new folder in your "public_html" folder, called "upload", change it's properties to 777.
        Now, in your form, change the name of the second upload field in "fotomobil1" and also set the encoding type in "multipart / form data" Save it and re-publish it.

        Please note that i have ONLY made required the fields with the asterisc on your form, not ALL of them as you did above
        Last edited by navaldesign; 05-12-2006, 06:42 AM.
        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


        • #49
          Re: Is there a tutorial for php script for Form here ?

          Thank you so much really. Really appreacite for your BIG help. Looks very loooong and complicated. I will print it out to compare with mine, to see what I did wrong with mine.
          I will let you know the result with the script that you provided.
          Thanks again.
          Happy World Peace Day.
          13 May 2006.
          WS_bLue

          Comment


          • #50
            Re: Is there a tutorial for php script for Form here ?

            Originally posted by Andy128
            WsBlue,

            In looking at the code for the "form" page - your action is left empty and you have encode type= text/plain and it should be blank.

            Your second form page "contact us" you have it set properly - which is action=hubung.php and the encode type is left blank.

            As to the error page- have you set up the php code to validate fields?

            As to the basic set up of a php mail to form- I can only suggest that you take a look at these instructions and try to follow them exactly. This will get you to a basic mail to WITHOUT field validation and error reporting.

            If you have already looked at these instructions- perhaps going over it one more time might help.

            http://netisopen.com/computer/TF001/T001.html

            Once you get that basic mail to working- we can tackle the validation of fields.

            Cheers

            Andy
            Using your link above I accidently pasted the script into the Start Page tab in the Page HTML instead of the Inside Body Tag tab. Preview in browser doesn't allow me to input name and email. Dale

            Comment


            • #51
              Re: Is there a tutorial for php script for Form here ?

              What Andy has put in his tutorial is how to insert the script in your php page, not in the form page. And also, as you already saw, the script has to be pasted in the Inside body Tag, of the "Thankyou" or "Confirmation" page. Delete it from your form page, create the thankyou page as per Andy's instructions and tutorial and everything will work
              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


              • #52
                Re: Is there a tutorial for php script for Form here ?

                [quote=navaldesign]Here is your script:

                <?php
                // Receiving variables
                @$agtnamalengkap = addslashes($_POST['agtnamalengkap']);
                @$agtktpnomor = addslashes($_POST['agtktpnomor']);
                @$agtktpdikeluarkan = addslashes($_POST['agtktpdikeluarkan']);
                @$agtktpberlaku = addslashes($_POST['agtktpberlaku']);
                @$agttanggallahir = addslashes($_POST['agttanggallahir']);
                @$agtbulanlahir = addslashes($_POST['agtbulanlahir']);
                @$agttahunlahir = addslashes($_POST['agttahunlahir']);
                @$agtalamatjalan = addslashes($_POST['agtalamatjalan']);
                @$agtalamatkota = addslashes($_POST['agtalamatkota']);
                @$agtalamatpropinsi = addslashes($_POST['agtalamatpropinsi']);
                @$agtalamatkodepos = addslashes($_POST['agtalamatkodepos']);
                @$agttelhp = addslashes($_POST['agttelhp']);
                @$agtemail = addslashes($_POST['agtemail']);
                @$agtsimnomor = addslashes($_POST['agtsimnomor']);
                @$agtsimjenis = addslashes($_POST['agtsimjenis']);
                @$agtsimdikeluarkan = addslashes($_POST['agtsimdikeluarkan']);
                @$agtsimberlaku = addslashes($_POST['agtsimberlaku']);
                @$kerjanamaperusahaan = addslashes($_POST['kerjanamaperusahaan']);
                @$kerjajenisusaha = addslashes($_POST['kerjajenisusaha']);
                @$kerjajenispekerjaan = addslashes($_POST['kerjajenispekerjaan']);
                @$kerjalamabekerja = addslashes($_POST['kerjalamabekerja']);
                @$kerjalamatjalan = addslashes($_POST['kerjalamatjalan']);
                @$kerjaalamatkota = addslashes($_POST['kerjaalamatkota']);
                @$kerjaalamatpropinsi = addslashes($_POST['kerjaalamatpropinsi']);
                @$kerjaalamatkodepos = addslashes($_POST['kerjaalamatkodepos']);
                @$kerjatel = addslashes($_POST['kerjatel']);
                @$kenmerktype = addslashes($_POST['kenmerktype']);
                @$kenjenismodel = addslashes($_POST['kenjenismodel']);
                @$kentahunpembuatan = addslashes($_POST['kentahunpembuatan']);
                @$kenkondisimesin = addslashes($_POST['kenkondisimesin']);
                @$kenalamatjalan = addslashes($_POST['kenalamatjalan']);
                @$kenalamatkota = addslashes($_POST['kenalamatkota']);
                @$kenalamatpropinsi = addslashes($_POST['kenalamatpropinsi']);
                @$kenalamatkodepos = addslashes($_POST['kenalamatkodepos']);
                @$kentelpemilikken = addslashes($_POST['kentelpemilikken']);
                @$kenkmperbulan = addslashes($_POST['kenkmperbulan']);
                @$kenkeperluanken = addslashes($_POST['kenkeperluanken']);
                @$kenjalandilalui = addslashes($_POST['kenjalandilalui']);
                @$kenluarkota = addslashes($_POST['kenluarkota']);
                @$kenkotatujuan = addslashes($_POST['kenkotatujuan']);
                @$fotomobil_Name = $_FILES['fotomobil']['name'];
                @$fotomobil_Size = $_FILES['fotomobil']['size'];
                @$fotomobil_Temp = $_FILES['fotomobil']['tmp_name'];
                @$fotomobil_Mime_Type = $_FILES['fotomobil']['type'];
                @$fotomobil1_Name = $_FILES['fotomobil1']['name'];
                @$fotomobil1_Size = $_FILES['fotomobil1']['size'];
                @$fotomobil1_Temp = $_FILES['fotomobil1']['tmp_name'];
                @$fotomobil1_Mime_Type = $_FILES['fotomobil1']['type'];
                function RecursiveMkdir($path)
                {
                if (!file_exists($path))
                {
                RecursiveMkdir(dirname($path));
                mkdir($path, 0777);
                }
                }
                // Validation
                if (strlen($agtnamalengkap) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if (strlen($agtktpnomor) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if (strlen($agttanggallahir) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if (strlen($agtbulanlahir) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if (strlen($agttahunlahir) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if (strlen($agttelhp) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if (strlen($agtemail) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if (strlen($agtsimnomor) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if (strlen($kenmerktype) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if (strlen($kentahunpembuatan) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if (strlen($fotomobil) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if( $fotomobil_Size == 0)
                {
                header("Location: errorpage.html");
                exit;
                }
                if (strlen($fotomobil) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if( $fotomobil_Size >10000)
                {
                //delete file
                unlink($fotomobil_Temp);
                header("Location: errorpage.html");
                exit;
                }
                $uploadFile = "upload/".$fotomobil_Name ;
                if (!is_dir(dirname($uploadFile)))
                {
                @RecursiveMkdir(dirname($uploadFile));
                }
                else
                {
                @chmod(dirname($uploadFile), 0777);
                }
                @move_uploaded_file( $fotomobil_Temp , $uploadFile);
                chmod($uploadFile, 0644);
                $fotomobil_URL = "http://www.beruang.biz/upload/".$fotomobil_Name ;

                if (strlen($fotomobil1) == 0 )
                {
                header("Location: errorpage.html");
                exit;
                }
                if( $fotomobil1_Size == 0)
                {
                header("Location: errorpage.html");
                exit;
                }
                if( $fotomobil1_Size >10000)
                {
                //delete file
                unlink($fotomobil1_Temp);
                header("Location: errorpage.html");
                exit;
                }
                $uploadFile = "upload/".$fotomobil1_Name ;
                if (!is_dir(dirname($uploadFile)))
                {
                @RecursiveMkdir(dirname($uploadFile));
                }
                else
                {
                @chmod(dirname($uploadFile), 0777);
                }
                @move_uploaded_file( $fotomobil1_Temp , $uploadFile);
                chmod($uploadFile, 0644);
                $fotomobil1_URL = "http://www.beruang.biz/upload/".$fotomobil1_Name ;
                //Sending Email to form owner
                $pfw_header = "From: $agtemail\n"
                . "Reply-To: $agtemail\n";
                $pfw_subject = "Put your subject here";
                $pfw_email_to = "youremail@yourdomain.com";
                $pfw_message = "agtnamalengkap: $agtnamalengkap\n"
                . "agtktpnomor: $agtktpnomor\n"
                . "agtktpdikeluarkan: $agtktpdikeluarkan\n"
                . "agtktpberlaku: $agtktpberlaku\n"
                . "agttanggallahir: $agttanggallahir\n"
                . "agtbulanlahir: $agtbulanlahir\n"
                . "agttahunlahir: $agttahunlahir\n"
                . "agtalamatjalan: $agtalamatjalan\n"
                . "agtalamatkota: $agtalamatkota\n"
                . "agtalamatpropinsi: $agtalamatpropinsi\n"
                . "agtalamatkodepos: $agtalamatkodepos\n"
                . "agttelhp: $agttelhp\n"
                . "agtemail: $agtemail\n"
                . "agtsimnomor: $agtsimnomor\n"
                . "agtsimjenis: $agtsimjenis\n"
                . "agtsimdikeluarkan: $agtsimdikeluarkan\n"
                . "agtsimberlaku: $agtsimberlaku\n"
                . "kerjanamaperusahaan: $kerjanamaperusahaan\n"
                . "kerjajenisusaha: $kerjajenisusaha\n"
                . "kerjajenispekerjaan: $kerjajenispekerjaan\n"
                . "kerjalamabekerja: $kerjalamabekerja\n"
                . "kerjalamatjalan: $kerjalamatjalan\n"
                . "kerjaalamatkota: $kerjaalamatkota\n"
                . "kerjaalamatpropinsi: $kerjaalamatpropinsi\n"
                . "kerjaalamatkodepos: $kerjaalamatkodepos\n"
                . "kerjatel: $kerjatel\n"
                . "kenmerktype: $kenmerktype\n"
                . "kenjenismodel: $kenjenismodel\n"
                . "kentahunpembuatan: $kentahunpembuatan\n"
                . "kenkondisimesin: $kenkondisimesin\n"
                . "kenalamatjalan: $kenalamatjalan\n"
                . "kenalamatkota: $kenalamatkota\n"
                . "kenalamatpropinsi: $kenalamatpropinsi\n"
                . "kenalamatkodepos: $kenalamatkodepos\n"
                . "kentelpemilikken: $kentelpemilikken\n"
                . "kenkmperbulan: $kenkmperbulan\n"
                . "kenkeperluanken: $kenkeperluanken\n"
                . "kenjalandilalui: $kenjalandilalui\n"
                . "kenluarkota: $kenluarkota\n"
                . "kenkotatujuan: $kenkotatujuan\n"
                . "fotomobil: $fotomobil_URL\n";
                *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
                header("Location: thankyoupage.html");
                ?>

                Hi! Naval,
                How are you? I Just came out from woods and now trying on the valuable scripts you provided for me more than a week ago. Thank you so much.
                But Very sorry to bother you again.
                May I ask why I can't attach pictures from my form. I clicked at browse and browsed through pictures from my PC and attached them but failed, when I tried to send the form.
                Could you please take a look? Thank you.
                www.beruang.biz/formulir.htm
                Regards,
                WS_Blue

                Comment


                • #53
                  Re: Is there a tutorial for php script for Form here ?

                  It seems as though you have not created the "upload" folder with permissions 777. Is this correct ?
                  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


                  • #54
                    Re: Is there a tutorial for php script for Form here ?

                    Originally posted by navaldesign
                    It seems as though you have not created the "upload" folder with permissions 777. Is this correct ?
                    Yes, I just did to create a new folder, called "upload"
                    But how to change its properties to 777?

                    Comment


                    • #55
                      Re: Is there a tutorial for php script for Form here ?

                      Originally posted by WSBlue
                      Yes, I just did to create a new folder, called "upload"
                      But how to change its properties to 777?
                      Connect to your site with FTP. Click on the folder to select it. You usually right click and from the menu that appears you select Properties. When the Properties popup appaears, you change the properties to 777
                      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


                      • #56
                        Re: Is there a tutorial for php script for Form here ?

                        Originally posted by navaldesign
                        Connect to your site with FTP. Click on the folder to select it. You usually right click and from the menu that appears you select Properties. When the Properties popup appaears, you change the properties to 777
                        But I want pictures to be uploaded from PC and NOT from URL.
                        Just like in Users CP, where there two options to upload avatar.
                        One from URL and the other one from Personal Computer.
                        I only want it from Personal Computer.
                        Can you please alter the scripts for me, again? Thank you so much, Naval.
                        Regards,
                        WS_Blue

                        Comment


                        • #57
                          Re: Is there a tutorial for php script for Form here ?

                          The script is for uploading pictures from PC. But the pictures end up in your site, sio you need that "Uploads" directory, because that's where they are uploaded. Then you get an email with the form info AND the link to download the pictures to your PC
                          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


                          • #58
                            Re: Is there a tutorial for php script for Form here ?

                            Originally posted by navaldesign
                            The script is for uploading pictures from PC. But the pictures end up in your site, sio you need that "Uploads" directory, because that's where they are uploaded. Then you get an email with the form info AND the link to download the pictures to your PC
                            I see, I will try to follow as instructed. Thank you.
                            But I already created a new folder using ftp and called it "upload" and I clicked properties but I didn't see anywhere to change it to 777.
                            Please advise.

                            Comment


                            • #59
                              Re: Is there a tutorial for php script for Form here ?

                              I don't know what FTP you use, and even if i knew, i probably wouldn't know where to find the correct command. Try reading the FTP's instructions
                              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


                              • #60
                                Re: Is there a tutorial for php script for Form here ?

                                Originally posted by navaldesign
                                I don't know what FTP you use, and even if i knew, i probably wouldn't know where to find the correct command. Try reading the FTP's instructions
                                Thank you so much NAVAL. will Let you know the result. Or it will be better off for me just to tranfer my account to Voda. Good night :)

                                Comment

                                Working...
                                X