Results 1 to 64 of 64

Thread: Is there a tutorial for php script for Form here ?
      
   

  1. #1
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Is there a tutorial for php script for Form here ?

    Dear Friends,
    I have read a lot of threads about applying php scripts for form.
    It will be nice if there is a TUTORIAL...like what script to be used for
    >*Required Field
    > Confirm Page or Thank you page
    > Error or Sorry required field needed page or
    rejected if phone number or
    postal code not being filled with numbers or
    uncorrect email ... like missing "@" or
    some thing like that.
    I am confused to read all those threads because everybody has different problems. There are TOO may to read. It will be nice if there is tutorial for this.
    Please advise. Thank you.
    Regards, WS_Blue

  2. #2
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: Is there a tutorial for php script for Form here ?

    I tend to agree with you in that there are lots and lots of different threads on the same subject. But thats the nature of forums where each person has a slightly different request.
    Different people have also tried to help at various times, hence the various
    solutions.
    Just keep in mind exactly what you want to achieve and then approach it one step at a time.
    For a simple form with f.e. name, email, and comment/message fields
    look at pablos example.
    Then when you wish to progress with perhaps error checking, look at navaldesign examples.
    If you are looking for something special you could always prevail upon
    naval to see if he or anyone else could help........
    Its not easy, but then its not that hard if you use search and view existing videos on forms......
    Good luck, and please post again if and when you need further help.

  3. #3
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Thanks! David.
    I have created a web using BV.. The content is not in English but in Indonesian.
    I have a page called
    FORMULIR means FORM and another page called
    HUBUNGI KAMI means CONTACT US.
    I have used the generic php script provided by BV and followed the instructions but can't get me to MY confirm or error page.
    Please kindly advise.
    Regards,
    WS_Blue
    Below is my site, would anyone please take a look and provide me your valuable knowledge for the scripts I need ?
    http://www.beruang.biz
    http://www.beruang.biz/formulir.htm (Form)
    http://www.beruang.biz/hubungikami.htm (Contact Us)

  4. #4
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: Is there a tutorial for php script for Form here ?

    Hi wsblue,

    Have looked at your home page, your formulir and your hubungikami page...
    I can see a problem:

    1) You have a form and a contact page but at the moment your links to both end up on your forms page.

    2) I can help you with your contact page in terms of
    name - email - message etc
    but you will need someone more expert with php to complete your
    forms page......

    get back to me with your thoughts.....

  5. #5
    Andy128's Avatar
    Andy128 is offline Major General
    Join Date
    Dec 2005
    Location
    Michigan
    Posts
    2,322

    Default Re: Is there a tutorial for php script for Form here ?

    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
    PHP- is a blast!

  6. #6
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    Field validation is not that hard. However it might become frustrating for someone with no experience. Hence, just build the form as you would like it, and i'll see to your script, whithin my limits
    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!


  7. #7
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by davidundalicia
    Hi wsblue,

    Have looked at your home page, your formulir and your hubungikami page...
    I can see a problem:

    1) You have a form and a contact page but at the moment your links to both end up on your forms page.
    I also don't know, how it happen and why can't it bring to confirm or error page.

    2) I can help you with your contact page in terms of
    name - email - message etc
    Thanks a lot, David,
    Please, at least it will get me a start.

    But, Can you please take a look here? Is this helpful or easier?

    Regards,
    WS_Blue

    but you will need someone more expert with php to complete your
    forms page......

    get back to me with your thoughts.....
    .................................................. ...............
    .................................................. ..............

  8. #8
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote 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
    Thanks, Andy.
    I have read a lot about, all of the problem everyone has in the threads. The more I read, the more worry and confuse I get. Don't know, where to start and which to follow. But I will try again what you suggested and hopefully, my site will get publihed properly soon.
    Regards, WSblue

  9. #9
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by navaldesign
    Field validation is not that hard. However it might become frustrating for someone with no experience. Hence, just build the form as you would like it, and i'll see to your script, whithin my limits
    Thanks.

  10. #10
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    [quote=navaldesign]Field validation is not that hard. However it might become frustrating for someone with no experience. Hence, just build the form as you would like it, and i'll see to your script, whithin my limits


    Yes. I have built my form(s).
    Perhaps, you may please take a look and donate some of your precious time to help me with the php scripts.
    Danke. Alles Gute!
    WS_Blue

    http://www.beruang.biz
    http://www.beruang.biz/formulir.htm (Form)
    http://www.beruang.biz/hubungikami.htm (Contact Us)

  11. #11
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: Is there a tutorial for php script for Form here ?

    wsblue,

    this is an extract from the tutorial that andy suggested you take another look at:

    PLEASE NOTE:

    The .html page that contains your form must have the EXACT same name as your .php page. For example If your form is on a page called feedback.html , the php page will be called feedback.php

    Looking at your code this morning,(I received a 404 error (form not found)
    I found the following....
    FORM name="Hubungi Kami" action=hubung.php
    I suggest you change the name of your php file to "HubungiKami.php"....this will then be the same name as your contact form.......
    and then ftp the new file to your main directory again.

  12. #12
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    Not really. There is no need for having the same name between html form page and php page. You got the 404 error because WSblue has not yet uploaded any php file.
    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!


  13. #13
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: Is there a tutorial for php script for Form here ?

    naval
    then why the heck have tutorials and then negate what they tell you.....

    The .html page that contains your form must have the EXACT same name as your .php page.

  14. #14
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    Well, we all are wrong sometimes
    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!


  15. #15
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: Is there a tutorial for php script for Form here ?

    naval, no problems, how did you find out that he had not
    uploaded a php file ??? just curious.....

  16. #16
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    He's simply waiting me to give him the script......

    OR, at least that's what i thought when i posted
    Last edited by navaldesign; 04-30-2006 at 05:24 PM.
    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!


  17. #17
    Andy128's Avatar
    Andy128 is offline Major General
    Join Date
    Dec 2005
    Location
    Michigan
    Posts
    2,322

    Default Re: Is there a tutorial for php script for Form here ?

    David

    I believe that I had corrected my tutorial some time ago- I had re-vamped it and the link above should have taken to the new one. In the new one
    the pages have different names.

    The new one has a Revised 4/20/06 in the upper left corner. Is this the one that you were talking about?

    Just trying to figure out what happened.

    Give me an e-mail if you have time.

    Andy
    PHP- is a blast!

  18. #18
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    Hi WSBlue, your http://www.beruang.biz/formulir.htm needs some corrections. Rename the second upload field. It has the same name as the first one. Also correct the tahunpembuatan] field. Take the ] off. Republish and let me know.
    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!


  19. #19
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    Hi WSBlue,
    here is the script for your contact form page:

    <?php
    // Receiving variables
    @$hubnamalengkap = addslashes($_POST['hubnamalengkap']);
    @$hubalamat = addslashes($_POST['hubalamat']);
    @$hubtelhp = addslashes($_POST['hubtelhp']);
    @$hubemail = addslashes($_POST['hubemail']);
    @$hubtanyasaran = addslashes($_POST['hubtanyasaran']);
    // Validation
    if (strlen($hubnamalengkap) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    if (strlen($hubalamat) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    if (strlen($hubtelhp) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    if (strlen($hubemail) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    if (strlen($hubtanyasaran) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    //Sending Email to form owner
    $pfw_header = "From: $hubemail\n"
    . "Reply-To: $hubemail\n";
    $pfw_subject = "Put your Subject here";//Change it as you wish
    $pfw_email_to = "youremail@beruang.biz"; //Put your own email in your account
    $pfw_message = "hubnamalengkap: $hubnamalengkap\n"
    . "hubalamat: $hubalamat\n"
    . "hubtelhp: $hubtelhp\n"
    . "hubemail: $hubemail\n"
    . "hubtanyasaran: $hubtanyasaran\n";
    *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
    header("Location: thankyou_page.html");
    ?>

    Please create the following pages in MSHTML: "error_page" and "thankyou_page". These must be simply BV pages. In the error page insert also a "Back" button to get them back in the form. To do so insert a html box in your page and paste there the following code:

    <FORM>
    <input type="button" class="but" value="< BACK TO THE FORM " onclick=history.go(-1)>
    </FORM>


    If you wish you may change the header("Location: error_page.html");
    after each field validation line (see above in red) creating separate error pages for every type of error.

    Copy the code and paste it in notepad. After you have made the changes, go to "Save as", choose File Type "All files" and save it as "hubung.php". Also please change the encoding type in "multipart/form data". Save and republish your form, and upload the script on your site, in the same folder as the form itself.
    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!


  20. #20
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

  21. #21
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by navaldesign
    Hi WSBlue,
    here is the script for your contact form page:

    <?php
    // Receiving variables
    @$hubnamalengkap = addslashes($_POST['hubnamalengkap']);
    @$hubalamat = addslashes($_POST['hubalamat']);
    @$hubtelhp = addslashes($_POST['hubtelhp']);
    @$hubemail = addslashes($_POST['hubemail']);
    @$hubtanyasaran = addslashes($_POST['hubtanyasaran']);
    // Validation
    if (strlen($hubnamalengkap) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    if (strlen($hubalamat) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    if (strlen($hubtelhp) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    if (strlen($hubemail) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    if (strlen($hubtanyasaran) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    //Sending Email to form owner
    $pfw_header = "From: $hubemail\n"
    . "Reply-To: $hubemail\n";
    $pfw_subject = "Put your Subject here";//Change it as you wish
    $pfw_email_to = "youremail@beruang.biz"; //Put your own email in your account
    $pfw_message = "hubnamalengkap: $hubnamalengkap\n"
    . "hubalamat: $hubalamat\n"
    . "hubtelhp: $hubtelhp\n"
    . "hubemail: $hubemail\n"
    . "hubtanyasaran: $hubtanyasaran\n";
    *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
    header("Location: thankyou_page.html");
    ?>

    Please create the following pages in MSHTML: "error_page" and "thankyou_page". These must be simply BV pages. In the error page insert also a "Back" button to get them back in the form. To do so insert a html box in your page and paste there the following code:

    <FORM>
    <input type="button" class="but" value="< BACK TO THE FORM " onclick=history.go(-1)>
    </FORM>


    If you wish you may change the header("Location: error_page.html");
    after each field validation line (see above in red) creating separate error pages for every type of error.

    Copy the code and paste it in notepad. After you have made the changes, go to "Save as", choose File Type "All files" and save it as "hubung.php". Also please change the encoding type in "multipart/form data". Save and republish your form, and upload the script on your site, in the same folder as the form itself.
    But I did upoad my php files which from Notepad.
    However, Thousand Thanks for the script above. I will Try to upload it.
    Regards,
    WS Blue
    There was a tutorial provided by BV. From BV webuilder ... View > Page HTML > (copy scipt) Paste script in the Inside Body Tag. BUT nothing can't be pasted from the script I copied, do I have to type up the script? Please advise!

  22. #22
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Thumbs up Re: Is there a tutorial for php script for Form here ?

    Nice to see, using Military Police officer ranking now.

  23. #23
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    Please DO NOT mix the script i gave you with any html page. It has to be uploaded using BlueFTP according to my instructions. Copy the code from my post above, then paste it in notepad, and do all the rest as instructed. If you have any problems, use MY FORM to give me your loggin info and i will do it for you.
    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!


  24. #24
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by navaldesign
    Hi WSBlue,
    here is the script for your contact form page:

    <?php
    // Receiving variables
    @$hubnamalengkap = addslashes($_POST['hubnamalengkap']);
    @$hubalamat = addslashes($_POST['hubalamat']);
    @$hubtelhp = addslashes($_POST['hubtelhp']);
    @$hubemail = addslashes($_POST['hubemail']);
    @$hubtanyasaran = addslashes($_POST['hubtanyasaran']);
    // Validation
    if (strlen($hubnamalengkap) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    if (strlen($hubalamat) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    if (strlen($hubtelhp) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    if (strlen($hubemail) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    if (strlen($hubtanyasaran) == 0 )
    {
    header("Location: error_page.html");
    exit;
    }
    //Sending Email to form owner
    $pfw_header = "From: $hubemail\n"
    . "Reply-To: $hubemail\n";
    $pfw_subject = "Put your Subject here";//Change it as you wish
    $pfw_email_to = "youremail@beruang.biz"; //Put your own email in your account
    $pfw_message = "hubnamalengkap: $hubnamalengkap\n"
    . "hubalamat: $hubalamat\n"
    . "hubtelhp: $hubtelhp\n"
    . "hubemail: $hubemail\n"
    . "hubtanyasaran: $hubtanyasaran\n";
    *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
    header("Location: thankyou_page.html");
    ?>



    If you wish you may change the header("Location: error_page.html");
    after each field validation line (see above in red) creating separate error pages for every type of error.

    Copy the code and paste it in notepad. After you have made the changes, go to "Save as", choose File Type "All files" and save it as "hubung.php". Also please change the encoding type in "multipart/form data". Save and republish your form, and upload the script on your site, in the same folder as the form itself.
    HI! I WOULD LIKE TO ASK MORE FOR SOMETHING THAT I DON'T UNDERSTAND:
    YOU WROTE THIS:
    Please create the following pages in MSHTML: "error_page" and "thankyou_page". (I ASK: WHAT IS MSHTML?)These must be simply BV pages. In the error page insert also a "Back" button to get them back in the form (I ASK: IS IT LIKE THE SUBMIT BUTTON?). To do so insert a html box in your page and paste there the following code: (I ASK: HOW TO INSERT A HTML BOX IN MY PAGE AND PASTE IN MY PAGE, WHERE TO CLICK? )

    <FORM>
    <input type="button" class="but" value="< BACK TO THE FORM " onclick=history.go(-1)>
    </FORM>

    (I ASK: COULD YOU PLEASE EXPLAIN ONE MORE TIME.)
    SO SORRY, FOR MY SLOW ABSORPTION. WSBLUE)

  25. #25
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    I saw that your pages are not made in BV. I'm i wrong?
    If you use BV, it's the top button in the left hand toolbar. Click on it. A window will open. Copy the code i gave you for the button, and paste it in that window. Close it, and you can then move the html box to place it anywhere you like in your page.
    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!


  26. #26
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by navaldesign
    I saw that your pages are not made in BV. I'm i wrong?
    If you use BV, it's the top button in the left hand toolbar. Click on it. A window will open. Copy the code i gave you for the button, and paste it in that window. Close it, and you can then move the html box to place it anywhere you like in your page.

    Yes. I got it, Thank you.
    when previewed it says : < Back to form.
    Can I change "< Back to Form" into my language?
    If possible, How to do it?

    BV is the ONLY one which get me to have interest to design my own web.

  27. #27
    Nyoman is offline Major
    Join Date
    Sep 2005
    Location
    heavenly-temple
    Posts
    426

    Default Re: Is there a tutorial for php script for Form here ?

    Hi WSblue, i didn't know if you are an indonesian, apa kabar? i like your car advertise site, of course you can change to any language. make it like this:
    Code:
    <FORM>
    <input type="button" class="but" value="< KEMBALI KE FORM" onclick=history.go(-1)>
    </FORM>
    or change with watever you want.

    Ooooops, Major, Lieutenant, general ? is it new system? wow i am a Major
    .
    .
    Nyoman

  28. #28
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by Nyoman
    Hi WSblue, i didn't know if you are an indonesian, apa kabar? i like your car advertise site, of course you can change to any language. make it like this:
    Code:
    <FORM>
    <input type="button" class="but" value="< KEMBALI KE FORM" onclick=history.go(-1)>
    </FORM>
    or change with watever you want.

    Ooooops, Major, Lieutenant, general ? is it new system? wow i am a Major
    Terima kasih / Thank you for liking my site. Want to do something like this in Bali? Bapak Nyoman masih tinggal di Bali?
    I am in Jakarta and have been to Bali only 3 times.
    My e mail is necon2000******.com
    > Yes, I got it. Now I can show it in Indonesian.
    > Why, the script that I save in NOTEPAD like hubung.php but end up being saved in Macromedia Dreamweaver.
    > Actually, I don't want to use a BAR to tell : BACK TO FORM (Balik ke Formulir) when required field not being filled
    BUT From here, where I did in BV.
    Can I do it and How?
    Maaf!


    Masih Ada Bagian Yang Belum Di-isi.
    Silahkan Balik Ke Formulir Dan

    Mengisi Bagian Yang Bertanda "
    *".

    Terima Kasih.



    (Sorry! * Required Field Must Be Filled. Please go back to Form)
    Thank you.
    Peace,
    WS_Blue


  29. #29
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    How can a .php script , which is simply a text file, uploaded with FTP, can end up to have anything with MS html Editor or Macromedia ?

    How do you upload (or publish) your pages? And are they built in BV or else? I'm still confused on that. How can you use BV directly if you're not hosting your site with Vodahost ?
    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!


  30. #30
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by navaldesign
    How can a .php script , which is simply a text file, uploaded with FTP, can end up to have anything with MS html Editor or Macromedia ?

    How do you upload (or publish) your pages? And are they built in BV or else? I'm still confused on that.
    How can you use BV directly if you're not hosting your site with Vodahost ?
    ~Yes. I copied your provided scripts and pasted it in a Notepad. save as: File name: hubungikami.php and Save as type "all files" and it is in Macromedia, not in a Notepad. Shall I remove away Macromedia programme from my PC?

    ~ I open the file where created my site using BV. copy of all of them and paste them in httpdocs provided by local server.

    <?php
    // Receiving variables
    @$hubnamalengkap = addslashes($_POST['hubnamalengkap']);
    @$hubalamat = addslashes($_POST['hubalamat']);
    @$hubtelhp = addslashes($_POST['hubtelhp']);
    @$hubemail = addslashes($_POST['hubemail']);
    @$hubtanyasaran = addslashes($_POST['hubtanyasaran']);
    // Validation
    if (strlen($hubnamalengkap) == 0 )
    {
    header("Location: error.htm");
    exit;
    }
    if (strlen($hubalamat) == 0 )
    {
    header("Location: error.htm");
    exit;
    }
    if (strlen($hubtelhp) == 0 )
    {
    header("Location: error.htm");
    exit;
    }
    if (strlen($hubemail) == 0 )
    {
    header("Location: error.htm");
    exit;
    }
    if (strlen($hubtanyasaran) == 0 )
    {
    header("Location: error.htm");
    exit;
    }
    //Sending Email to form owner
    $pfw_header = "From: $hubemail\n"
    . "Reply-To: $hubemail\n";
    $pfw_subject = "Saran & Pertanyaan";
    $pfw_email_to = "beruang.biz******.com";
    $pfw_message = "hubnamalengkap: $hubnamalengkap\n"
    . "hubalamat: $hubalamat\n"
    . "hubtelhp: $hubtelhp\n"
    . "hubemail: $hubemail\n"
    . "hubtanyasaran: $hubtanyasaran\n";
    *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
    header("Location: confirmation.htm");
    ?>

    I still can't get my contact (hubungikami) page to my error page or confirmation page yet. Sorry! Any different betwen htm and html?

    http://www.beruang.biz
    http://www.beruang.biz/error.htm
    http://www.beruang.biz/confirmation.htm

    Thank you. Regards, WS Blue

  31. #31
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    You are using BV to create your site. Then since BVwill not publish in your site (because it is not Vodahost) you save the preview page in your computer, then copy the code and paste it in your server. First: this way the dynamic features of BVwill not work, second, it creates conflicts. Anyway, the php script is intended to be uploaded using FTP, not copying and pasting.
    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!


  32. #32
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by navaldesign
    You are using BV to create your site. Then since BVwill not publish in your site (because it is not Vodahost) you save the preview page in your computer, then copy the code and paste it in your server. First: this way the dynamic features of BVwill not work, second, it creates conflicts. Anyway, the php script is intended to be uploaded using FTP, not copying and pasting.
    Then, Please tell me what I should do?
    MUST I create an account with Vodahost in order to make it work?
    But I did it earlier using generic script provided by BV. I copied and pasted and it worked.
    I could send my form to my own e mail, but my own email address didn't show up as a sender.
    Please advise!
    Thank you
    WSBlue

  33. #33
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by WSBlue
    Then, Please tell me what I should do?
    MUST I create an account with Vodahost in order to make it work?
    But I did it earlier using generic script provided by BV. I copied and pasted and it worked.
    I could send my form to my own e mail, but my own email address didn't show up as a sender.
    Please advise!
    Thank you
    WSBlue
    .................................................. .................................................. ....

  34. #34
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    I want to be honest with you: the php script will work, if properly set up, either way. But, since you are creating your pages with BV, you will see that ALL of the dynamic features of BV will NOT work on any other server. You won't have rollovers, Galleries, Dropdown menus, mouseover effects an so on. So, if you really want to have a nice site (most important for people like you who count on it for their job) i would suggest you to get yourself a Vopdahost account. As you can see, we also provide Graet Support.
    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!


  35. #35
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by navaldesign
    I want to be honest with you: the php script will work, if properly set up, either way. But, since you are creating your pages with BV, you will see that ALL of the dynamic features of BV will NOT work on any other server. You won't have rollovers, Galleries, Dropdown menus, mouseover effects an so on. So, if you really want to have a nice site (most important for people like you who count on it for their job) i would suggest you to get yourself a Vopdahost account. As you can see, we also provide Graet Support.

    I thought, I tried it out with my local server here as I can call and ask questions with them before I transfer my account to Voda cause I am afraid I can get my site publish properly like as I wish.
    I will consider about your suggestion .
    Your future help and support will be higly aprreciated after I transfer my account with Voda. OK?
    Please let me learn, how to do account transfer first, create e mail address and redirect and affiliate programme and others.
    Thanks
    WS_bLUE

  36. #36
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by navaldesign
    Hi WSBlue, your http://www.beruang.biz/formulir.htm needs some corrections. Rename the second upload field. It has the same name as the first one. Also correct the tahunpembuatan] field. Take the ] off. Republish and let me know.
    http://www.beruang.biz
    Hi! Naval
    Thanks for script which you provided earlier for my ("Contact Us".)
    http://www.beruang.biz/hubungikami.htm (Contact Us)

    Now,
    I try to do this ("Form") on my own by trying to follow what you provided for ("Contact Us".)
    http://www.beruang.biz/formulir.htm (Form)
    but failed. Could you, please take a look of what I did.
    <?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");
    ?>

    BUT It can't take me to confirmation or error page. Could you please, provide a correct scripts for me, please?

    And beside that, in this form of mine, I also ask for photo to be upload. How can I limit the size and the photos are A MUST in order to complete the form?

    Thousand thanks for your valuable time.

    Regards,
    WS_Blue

  37. #37
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    There are some errors in your script. Nothing important. Most have to do with missing something simple as ";". But, you have made practically ALL fields required, and you have no code for the upload fields.
    The max size fot the file to be uploaded is set in this, missing code. Ok, i&#236;ll prepare a script for you later.

    I think you should consider becoming Vodahost Client
    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!


  38. #38
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by navaldesign
    There are some errors in your script. Nothing important. Most have to do with missing something simple as ";". But, you have made practically ALL fields required, and you have no code for the upload fields.
    The max size fot the file to be uploaded is set in this, missing code. Ok, iìll prepare a script for you later.

    I think you should consider becoming Vodahost Client
    YES. FOR SURE, I WILL.
    I have couple more of webs I want to do. Thinking of domain names.
    Must I register several accounts for each different domains?

    In my http://www.beruang.biz
    I have two different kinds of Forms. Do I need to create two error and two confirmation page as right now only has one for each?
    And also, How do I get RIGHT value for the FORM being submitted. Phone number must be in Numbers and not in alphabet. e mail address must be an e mail address, at least contain this sign "@"; not something else. or else it will go to error page. The photo also will be sent to error page it uploaded larger than maximum size.

    Thank you again for your precious time to prepare me this second scripts. Best Regards,
    WS_Blue

  39. #39
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    All of these error types can be checked by the script i will prepare for you.

    You can purchase as many accounts as you want. Also, if all of the sites that you will add are yours, you can only purchase one account, and host them in the same account. Unlesss you are going to use many databases like forums, galleries, blogs etc. for all of them, in which case you could have bandwidth and server resources problems. in that case it is advisable that you get separate accounts for each domain.
    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!


  40. #40
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by navaldesign
    All of these error types can be checked by the script i will prepare for you.

    You can purchase as many accounts as you want. Also, if all of the sites that you will add are yours, you can only purchase one account, and host them in the same account. Unlesss you are going to use many databases like forums, galleries, blogs etc. for all of them, in which case you could have bandwidth and server resources problems. in that case it is advisable that you get separate accounts for each domain.
    Hi! Major Naval,
    I can't have only one account for several different domain, Can I ?
    Different domain names must have seperate different account, Right?
    and I can't use same domain name because all of the business are not related to one another. Please advise. Thank you. Regards, WS_Blue
    Sorry! What is Meta Tags for?

  41. #41
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    If the domains are yours, which means that you reasult as the Technical AND Amministrative responsible, you can have more domains in the same account. One is the main domain, the others are addon domains, by all means independent from the main.

    Meta tags: For page title, description, keywords, author, generator, etc.
    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!


  42. #42
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by navaldesign
    If the domains are yours, which means that you reasult as the Technical AND Amministrative responsible, you can have more domains in the same account. One is the main domain, the others are addon domains, by all means independent from the main.

    Meta tags: For page title, description, keywords, author, generator, etc.
    Hi! Major General,
    Understood. Thank you.
    When can I have the second script which you want to provide as I am still waiting for it.
    Really appreaciate all your valuable time provided.
    Good day.
    WS_Blue

  43. #43
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by WSBlue
    Hi! Major General,
    Understood. Thank you.
    When can I have the second script which you want to provide as I am still waiting for it.
    Really appreaciate all your valuable time provided.
    Good day.
    WS_Blue
    Hi! Naval Major General,Where have you been? Didn't see you around?I am still waiting for your help to correct my second scripts.
    http://www.beruang.biz/formulir.htm
    Take care, Man.WS_Blue

  44. #44
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by WSBlue
    Hi! Major General,
    Understood. Thank you.
    When can I have the second script which you want to provide as I am still waiting for it.
    Really appreaciate all your valuable time provided.
    Good day.
    WS_Blue
    Hi! Naval Major General,Where have you been? Didn't see you around?I am still waiting for your help to correct for my second scripts. Take care, Man.WS_Blue

  45. #45
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    I know, just had lots to do and your script is QUITE complicated. I'll play with it tomorrow morning. Sorry.
    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!


  46. #46
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote 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

  47. #47
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote 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");
    ?>

  48. #48
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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 at 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!


  49. #49
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default 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

  50. #50
    nothingnew Guest

    Default Re: Is there a tutorial for php script for Form here ?

    Quote 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

  51. #51
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  52. #52
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default 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

  53. #53
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  54. #54
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote 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?

  55. #55
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    Quote 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!


  56. #56
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote 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

  57. #57
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  58. #58
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote 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.

  59. #59
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  60. #60
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote 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 :)

  61. #61
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    You bet that's your best choice
    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!


  62. #62
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    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.
    Hi, Naval,
    Was told, its dangerous to use upload to upload something cause people might upload just anything . It's better to have the pictures sent to database. Is it right and How can I do that?
    WS_BLUE

  63. #63
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by WSBlue
    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.
    Hi, Naval,
    Was told, its dangerous to use upload to upload something cause people might upload just anything . It's better to have the pictures sent to database. Is it right and How can I do that?
    WS_BLUE
    I'd like to help, but please understand that you're not a Vodahost Customer and i can't go on with this. Creating a script for database upload, and the relevant retreive script is something far beyond the help that i can provide even for Vodahost clients, much more for a non Vodahost customer.
    Sorry
    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!


  64. #64
    WSBlue's Avatar
    WSBlue is offline Brigadier General
    Join Date
    Apr 2006
    Posts
    1,416

    Default Re: Is there a tutorial for php script for Form here ?

    Quote Originally Posted by navaldesign
    I'd like to help, but please understand that you're not a Vodahost Customer and i can't go on with this. Creating a script for database upload, and the relevant retreive script is something far beyond the help that i can provide even for Vodahost clients, much more for a non Vodahost customer.
    Sorry
    I am sorry! Naval. But I didn't mean to try to take a free ride.
    I thought, I try it out first before I transfer to Voda.
    Cheers.
    WS_Blue

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49