Form Help

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

    • Dec 2006
    • 15

    #16
    Re: Form Help

    Hi Navaldesing,
    For the first thank you very much for your help!
    This script could be very suitable for me, I just don`t need to upload any files --- I need to upload the information from the form`s fields wich will be entering by the visitors to the file or to the folder. Than I could link to the this file or enter forexample an I-frame with this file. The Idea is : when a visitor will submit the information it will immediately appear on the page ( it will be a page with the i-frame contents that file). Hope, that you will understand my funny explanation.
    Thank you very much
    Marina
    Marina
    http://www.amerautogroup.com

    Comment

    • navaldesign
      General & Forum Moderator

      • Oct 2005
      • 12080

      #17
      Re: Form Help

      Hi Marina,

      ABVFP is a multifeature script. It allows amomg others, file uploads, but this doesn't mean that you need to use that feature.

      Anyway, going back to the second part of your post: what you have shown me in that other site (the form and the page with the car sales display) requires a very specific script. It is not a question of i-frame. The info needs to be stored in a database, and then, a specific script, can make so that listings are displayed in a page. No need for I-frame.
      However, i repewat, this would be a custom made script, database driven and , since this is a commercial site, it also has to have beautifull templates, styled like the rest of your site pages. This is not something you find for free. If you are interested, click on my signature to contact me.
      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

      • amerauto
        Corporal

        • Dec 2006
        • 15

        #18
        Re: Form Help

        Hi Navaldesign,
        Thank you very much once again!
        Yes, I understand it, the script what my friend has in his car sales site is too complicated and that`s why I want already to use something more simple -- like simple guestbook.There`re just one thing -- they are always have just 4 or 5 fields and I need 11 fields. By the way, the Simple Guestbook at the CPanel (CGI Center) is not working at all. It won`t save even a template.
        So, how do you think --- can I find a script which will "drive" a simple guestbook( may be without a database) or it`s also too hard?
        Anyway, let me say you a BIG-BIG THANKS for your immediate answers and so friendly support!
        Have a nice day
        Marina
        Marina
        http://www.amerautogroup.com

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #19
          Re: Form Help

          There is NO guestbook or other similar script which is not database driven. At least not one that is worth considering.

          And, a guest book in place of a listing script, seems (in my opinion) highly unprofessional. But ofcourse, its your call.
          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

          • abcdme
            Sergeant

            • Mar 2006
            • 33

            #20
            Re: Form Help

            Hi Naval,

            Me again. Sorry to be such a pain.

            I have been working on a website for a rowing club that I am in and was wondering if you would have a look at this .php script compared to my page script. I know that there are a few errors and some very very noob ones as I have no experience with php at all!

            This is the location of the whole idea:
            http://hbrc.dwat.co.nz/public_html/pages/contact.html >> upload tab.
            and
            http://hbrc.dwat.co.nz/public_html/p...ion/upload.php >> script derived from yours above, badly edited though!

            This is the php script. HTML script will appear below it.

            PHP Code:
            <?php
             
            // ------ HBRC Upload PHP Script -------------------------
             
            @$fname addslashes($_POST['fname']);
            @
            $lname addslashes($_POST['lname']);
            @
            $access addslashes($_POST['access']);
            @
            $size addslashes($_POST['size']);
            $size1 $size/1000;
            for (
            $i 1$i <= 1$i++)
            {
            $Image_Upload "Image_Upload_$i";
            @
            $Image_Upload_Size[$i]= $_FILES[$Image_Upload]['size'];
            @
            $Image_Upload_Name[$i]= $_FILES[$Image_Upload]['name'];
            @
            $Image_Upload_Temp[$i]= $_FILES[$Image_Upload]['tmp_name'];
            }
            function 
            RecursiveMkdir($path)
            {
            if (!
            file_exists($path))
            {
            RecursiveMkdir(dirname($path));
            mkdir($path0777);
            }
            }
             
            if (
            strlen($fname) == )
            {
            $error .= "We require your first name on this upload. Please enter it.\n";
            }
            if (
            strlen($lname) == )
            {
            $error .= "We require your last name on this upload. Please enter it.\n";
            }
            for (
            $i 1$i <= 1$i++)
            {
            if (
            $Image_Upload_Size[$i] > $size)
            {
            $error .= "The size of your file is bigger than the allowed ($size1 Kb). Please change its size\n";
            }
            }
            if (
            $error != "")
             
            {
             
            ?>
            <html xmlns="http://www.w3.org/1999/xhtml">
            <head>
            <title>Hawkes Bay Rowing Club Form Validation</title>
            <link href="../css/hbrccss.css" rel="stylesheet" type="text/css" />
            </head>
             
            <body>
            <div id="titlehead">
              <div align="center"><img src="../images/titleheadhbrc.jpg" alt="The Hawkes Bay Rowing Club" width="400" height="80" /></div>
            </div>
            <div id="mainbodyindex">
              <blockquote>
              <div id="mainbodycontents">
                  <blockquote class="mainbodyheading">
                    <p>There were some errors with your form.</p>
                  </blockquote>
                  <p><?php echo $error?></p>
                <p>Please use the Back button and correct the error(s).</p>
                <p><button type="button" onClick="history.go(-1)" style="width:150px;height:41px">
                <P class="mainbodysubheading">Back</P>
                </button></p></div>
              </blockquote>
              <div id="bottomlinks">
                <div id="rig***ornerbottomlinks"></div>
                <div id="bottomshadowlinks"></div>
                <div id="leftcornerbottomlinks"></div>
                <div align="center" class="style1"><a href="../../in600_weekdan/index.html" target="_top">Frames</a>/<a href="index.html" target="_top">No Frames</a> | <a href="index.html">Home</a> | <a href="about.html">About</a> | <a href="news.html">News</a> | <a href="training.html">Training</a> | <a href="media.html">Rowers in Action</a>  | <a href="contact.html">Contact</a> | <a href="membersarea.html">Members Area</a> | <a href="links.html">Links</a></div>
              </div>
              <div id="leftsidebody"></div>
              <div id="leftcornertopbody"></div>
              <div id="rightsidebody"></div>
              <div id="rig***ornertopbody"></div>
            </div>
            </body>
            </html>
            <?php
            }
             
            for (
            $i 1$i <= 1$i++)
            {
             
            if (
            $Image_Upload_Size[$i] < $size and $Image_Upload_Size[$i] >0)
            {
            $uploadFile "uploads/".$Image_Upload_Name[$i];
            if (!
            is_dir(dirname($uploadFile)))
            {
            @
            RecursiveMkdir(dirname($uploadFile));
            }
            else
            {
            @
            chmod(dirname($uploadFile), 0777);
            }
            @
            move_uploaded_file$Image_Upload_Temp[$i] , $uploadFile);
            chmod($uploadFile0644);
            $Image_URL[$i] = "http://hbrc.dwat.co.nz/public_html/uploads/".$Image_Upload_Name[$i];
            }
            }
            // Find Server date and Time
            $date date("l jS F Y, g:i A");
             
            // --------Find Browser and IPaddress----------------------------
            $browser =$_SERVER['HTTP_USER_AGENT'];
            $ip $_SERVER['REMOTE_ADDR'];
             
            //---------Sending Email to form owner ---------------------------
            $nd_header "From: $server\n"
            "Reply-To: $noreply@?????.nz\n";
            $nd_subject "New file from the HBRC web site";
            $nd_email_to "????@????";
            $nd_message "New File Uploaded:\n"
            "-------------------------------------------\n"
            "Uploaders First Name: $fname\n"
            "Uploaders Last Name: $lname\n"
            "-------------------------------------------\n"
            "Access to the file: $access\n"
            "-------------------------------------------\n";
            $nd_message .= "Date of Submission : $date\n"
            "Browser : $browser\n"
            "IP address : $ip\n"
            "-------------------------------------------\n"
            &mail($nd_email_to$nd_subject ,$nd_message ,$nd_header ) ;
            header("Location: thankyou.html");
             
            ?>
            HTML Script here....

            HTML Code:
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml">
            <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <title>Hawkes Bay Rowing Club - Contact</title>
            <link href="../css/hbrccss.css" rel="stylesheet" type="text/css" />
            <script src="../js/sprytabbedpanels.js" type="text/javascript"></script>
            <script src="../js/spryvalidationtextfield.js" type="text/javascript"></script>
            <script src="../js/spryvalidationselect.js" type="text/javascript"></script>
            <script src="../js/spryvalidationtextarea.js" type="text/javascript"></script>
            <link href="../css/sprytabbedpanels.css" rel="stylesheet" type="text/css" />
            <link href="../css/spryvalidationtextfield.css" rel="stylesheet" type="text/css" />
            <link href="../css/spryvalidationselect.css" rel="stylesheet" type="text/css" />
            <link href="../css/spryvalidationtextarea.css" rel="stylesheet" type="text/css" />
            </head>
             
            <body>
            <div id="titlehead">
              <div align="center"><img src="../images/titleheadhbrc.jpg" alt="The Hawkes Bay Rowing Club" width="400" height="80" /></div>
            </div>
            <div id="mainbodycontact">
              <div id="bottomlinks">
                <div id="rig***ornerbottomlinks"></div>
                <div id="bottomshadowlinks"></div>
                <div id="leftcornerbottomlinks"></div>
                <div align="center" class="style1"><span class="noneunderlinelink"><a href="../index.html" target="_top">Frames</a>/<a href="contact.html" target="_top">No Frames</a> | <a href="index.html">Home</a> | <a href="about.html">About</a> | <a href="news.html">News</a> | <a href="training.html">Training</a> | <a href="media.html">Rowers in Action</a>  | <a href="contact.html">Contact</a> | <a href="membersarea.html">Members Area</a></span> | <a href="links.html">Links</a></div>
              </div>
              <div id="leftsidebody"></div>
              <div id="leftcornertopbody"></div>
              <div id="rightsidebody"></div>
              <div id="rig***ornertopbody"></div>
              <blockquote>
                <div id="mainbodycontents">
                  <blockquote class="mainbodyheading">
                    <p>Contact the Hawkes Bay Rowing Club Web Site</p>
                  </blockquote>
                  <p class="mainbodysubheading">You can contact us via <span class="mainbodysubheadingitalic">phone, form,</span> or <span class="mainbodysubheadingitalic">upload a file</span> from this page.</p>
                  <div id="TabbedPanels1" class="TabbedPanels">
                    <ul class="TabbedPanelsTabGroup">
                      <li class="TabbedPanelsTab" tabindex="0">Phone</li>
                      <li class="TabbedPanelsTab" tabindex="0">Form</li>
                      <li class="TabbedPanelsTab" tabindex="0">Upload</li>
                    </ul>
                    <div class="TabbedPanelsContentGroup">
                      <div class="TabbedPanelsContent"> 
                        <span class="italictext">You can easily contact club representatives via phone.            </span>
                        <p class="mainbodysubheadingitalic">Contact Numbers:</p>
                        <p>Club President: Neil Pulford <br />
                        — (06) 877 7777</p>
                        <p>Club Secretary: Louise Trautvetter <br />
                        —(06) 877 7777</p>
                        <p>Club Treasurer: Hewitt Harrison/Jo Tripp<br />
                        —(06) 877 7777</p>
                        <p>Club Captain: Robert Harrison <br />
                        —(06) 877 7777 or (06) 877 7777</p>
                        <p>Coaching Coordinator: Dick Tripp <br />
                        —(06) 877 7777</p>
                      </div>
                      <div class="TabbedPanelsContent">
                        Use this form to ask a club member a question.
                          <form action="mailto:??????@???????" method="post" enctype="multipart/form-data" name="contact hbrc" id="contact hbrc">
                            <p class="mainbodysubheadingitalic">Contact the Hawkes Bay Rowing Club</p>
                            <p><span id="sprytextfield1">
                              <label>First Name:
                              <input type="text" name="fn" id="fn" />
                              </label>
                            <span class="textfieldRequiredMsg">A value is required.</span></span><br />
                            <span id="sprytextfield2">
                            <label>Last Name:
                            <input type="text" name="ln" id="ln" />
                            </label>
                            <span class="textfieldRequiredMsg">A value is required.</span></span><br />
                            <span id="sprytextfield3">
                            <label>Phone Number:
                            <input type="text" name="pn" id="pn" />
                            </label>
                            <span class="textfieldRequiredMsg">A value is required.</span></span><br />
                            <span id="sprytextfield4">
                            <label>Email Address
                            <input type="text" name="ea" id="ea" />
                            </label>
                            <span class="textfieldRequiredMsg">A value is required.</span></span></p>
                            <p><span id="spryselect1">
                              <label>How would you like us to contact you?
                              <select name="cm" id="cm">
                                <option value="na">None...</option>
                                <option value="email">Email</option>
                                <option value="phone">Phone</option>
                              </select>
                              </label>
                            <span class="selectInvalidMsg">Please select a valid item.</span>                  <span class="selectRequiredMsg">Please select an item.</span></span>
                              <input name="size1" type="hidden" id="size1" value="88888" />
                              <input name="size" type="hidden" id="size" value="99999" />
                            </p>
                            <p><span id="sprytextarea1">
                              <label>Enter your Query below:
                              <textarea name="qy" id="qy" cols="90" rows="5"></textarea>
                              </label>
                            <span class="textareaRequiredMsg">A value is required.</span></span><br />
                            <label>
                            <input type="submit" name="sm" id="sm" value="Submit" />
                            </label>
                            </p>
                        </form>
                        <p class="mainbodysubheadingitalic">&nbsp;</p>
                      </div>
                      <div class="TabbedPanelsContent">
                        Use this form to upload a document, image or video. You can upload one file at a time.
                          <form action="../phpvalidation/upload.php" method="post" enctype="multipart/form-data" name="upload" id="upload">
                            <p class="mainbodysubheadingitalic">Upload a/some file(s) to share with the club and/or public.</p>
                            <label>First Name:
                            <input type="text" name="fname" id="fname" />
                            </label>
                            <br />
                            <label>Last name:
                            <input type="text" name="lname" id="lname" />
                            </label>
                            <br />
                            <br />
                            <fieldset>
                            <legend>File(s) to upload</legend>
                            <table width="98%" border="1" id="uploadtable">
                              <tr>
                                <td scope="row"><label>File:
                                    <input type="file" name="Image_Upload_1" id="Image_Upload_1" />
                                </label></td>
                              </tr>
                            </table>
                            </fieldset>
                            <p>Choose the area that you would like the file(s) to be displayed in.<br />
                              <label>
                                <input type="radio" name="access" value="pview" id="access_0" />
            Public</label>
                                <br />
                                <label>
                                <input type="radio" name="access" value="mview" id="access_1" />
            Members Only</label>
                            </p>
                            <p>
                              <label>
                              <input type="submit" name="sm" id="sm" value="Submit" />
                              </label>
                            </p>
                        </form>
                          <p class="mainbodysubheadingitalic">&nbsp;</p>
                      </div>
                    </div>
                  </div>
                  <p>&nbsp;</p>
                </div>
              </blockquote>
            </div>
            <script type="text/javascript">
            <!--
            var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
            var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
            var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
            var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
            var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4");
            var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {invalidValue:"na"});
            var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1");
            //-->
            </script>
            </body>
            </html>
             
            It would be great if we could have your help. Obviously that will not be the final location of the website, we hope to get our own domain name if a company will sponsor it for us.

            I was also wondering, what software do you use to assist you if you use any?

            Thanks for your time.

            Daniel
            Tyres and Romantic Books

            Comment

            • navaldesign
              General & Forum Moderator

              • Oct 2005
              • 12080

              #21
              Re: Form Help

              I am nt sure what you are trying to acheive here.

              I mean, the forms that you are creating can be built in BV in 10 minutes. The fields can be made required both using BV's built in Javascript validation, and also using ABVFP.
              Using ABVFP all the actions that you are trying to accomplish with your script are made automatically and very easily.

              Unless you are trying to learn some php, in which case go on on this, i don't see the meaning of the above. However, you are mixing parts taken here and there and i don't know what your final result will be.

              Anyway, the loop

              for ($i = 1; $i <= 1; $i++)
              {
              if ($Image_Upload_Size[$i] > $size)
              {

              and the other similar will not work, as you start with $i = 1 and you set $i max <= 1. So there is no loop at all. And, you don't even need one, since you only have one upload field.

              Also, $size is NOT a form sent variable, it must be set directly in the script with a

              $size = 200000;
              line (example for 200 Kb) .

              Furthermore: the part of the form that would mail a member: the mailto: action will NOT, in most cases 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

              Working...
              X