Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Forms....

  1. #11
    Join Date
    Aug 2005
    Posts
    16

    Default

    does anyone know websites that offer free remotely hosted form manager with file upload support? formbuddy.com does not offer free file upload support. i think i know how to make my own forms but im unsure if bizhat supports cgi blah blah...

    thanks.

  2. #12
    Join Date
    Nov 2005
    Location
    Hell
    Posts
    253

    Default

    does bizhat support .shtml pages?

  3. #13
    Join Date
    Aug 2004
    Location
    USA
    Posts
    996

    Default

    Yea they sure do.


    I can host you guys that email contact script if you need me to.

  4. #14

    Default form mail with cgi-bin

    CGI CODE:
    Code:
    #!/usr/local/bin/perl
    
    #bnbform.cgi
    #(c)1997 BigNoseBird.Com
    #No warranties, etc.. Gratis for your learning and another
    #experience you might need it for!
    
    
    ############## SPECIAL FORM VARIABLES ############################
    #required:    comma delimited list of required entry fields
    #data_order:  comma delimited list indicating what fields to actually
    #             print and in what order.
    #outputfile:  the name of the file to save the data in if using a file
    #ok_url:      URL to go to if successful
    #not_ok_url   URL to go to if unsuccessful
    #submit_to:   email address of person to input receive data by mail
    #submit_by:   email address of person completing form
    #autorespond: if yes, then send confirmation to submitter
    #automessage: text to print for autoconfirmation e-mail
    #form_id:     name of form for e-mail subject
    ##################################################################
    
    
    ## MAIN ##########################################################
    
    #This indicates the sendmail program. Should be okay for almost
    #all unix systems.
    $mail_program="/usr/lib/sendmail -t";
    #
    
       &decode_vars;
       &valid_data;
       &write_data;
       if ($fields{'autorespond'} eq "yes")
        { &answer_back; }
    
       if ($fields{'ok_url'} ne "")
        { print "Location:$fields{'ok_url'}\n\n"; }
         else { &thank_you; }
    
    ##################################################################
    sub write_data
    {
       $the_date=localtime();
       if ($fields{'submit_to'} ne "")
        {
         &open_mail;
         print MAIL "To: $fields{'submit_to'}\n";
         print MAIL "From: $fields{'submit_by'}\n";
         print MAIL "Subject: $fields{'form_id'} RESPONSE\n";
         print MAIL "On $the_date,\n";
         print MAIL "The following information was submitted:\n";
        }
       if ($fields{'outputfile'} ne "")
        { open(OUT_FILE,">>$fields{'outputfile'}"); }
       foreach $to_print (@sortlist)
        {
          if ($fields{'outputfile'} ne "")
           { print OUT_FILE "$fields{$to_print}\|"; }
          if ($fields{'submit_to'} ne "")
           { print MAIL "$to_print = $fields{$to_print}\n"; }
        }
       if ($fields{'outputfile'} ne "")
        {
         print OUT_FILE "$the_date\|\n";
         close(OUT_FILE);
        }
       if ($fields{'submit_to'} ne "")
        { &close_mail; }
    }
    
    ##################################################################
    sub decode_vars
     {
      $i=0;
      read(STDIN,$temp,$ENV{'CONTENT_LENGTH'});
      @pairs=split(/&/,$temp);
      foreach $item(@pairs)
       {
        ($key,$content)=split(/=/,$item,2);
        $content=~tr/+/ /;
        $content=~s/%(..)/pack("c",hex($1))/ge;
        $content=~s/\012//gs;
        $content=~s/\015/ /gs;
        $fields{$key}=$content;
        if ($key eq "data_order")
          {
           $content=~s/ //gs;
           @sortlist=split(/,/,$content);
          }
        if ($key eq "required")
          {
           $content=~s/ //gs;
           @mandatory=split(/,/,$content);
          }
       }
    }
    
    ##################################################################
    sub valid_data
      {
       if ($fields{'data_order'} eq "")    #make sure we have work to do!
        {
          print "Content-type: text/html\n\n"; 
          print <<__W1__;
    
          <H1>NO data_order list SPECIFIED!</H1>
    
    __W1__
          exit;
        }
    
       foreach $to_check (@mandatory) #test all required fields, bail on 1st bad
        {                             
          if ($fields{$to_check} eq "")
            {
              if ($fields{'not_ok_url'} ne "")
                { 
                  print "Location:$fields{'not_ok_url'}\n\n";
                }
                 else
                  {
                    &try_again;
                  }
             }
        }
    
      }
    
    ##################################################################
    sub thank_you
      {
          print "Content-type: text/html\n\n"; 
          print <<__W2__;
    
          <H1>Thank you!</H1>
          Your information has been sent and I will be in touch
          with you soon.
    
    __W2__
          exit;
      }
    
    ##################################################################
    sub try_again
      {
          print "Content-type: text/html\n\n"; 
          print <<__W3__;
    
          <H1>Missing Data!</H1>
          Please press the back button and fill in
          all required fields!
    
    
    
    __W3__
          exit;
      }
    
    ##################################################################
    sub open_mail
     {
           open (MAIL, "|$mail_program")
     }
    
    ##################################################################
    sub close_mail
     {
      close(MAIL);
     }
    
    ##################################################################
    sub answer_back
     {
      &open_mail;
      print MAIL "To: $fields{'submit_by'}\n";
      print MAIL "From: $fields{'submit_to'}\n";
      print MAIL "Subject: Thank you\n";
      if ($fields{'automessage'} ne "")
       {
        open (AM,$fields{'automessage'});
        while (<AM>)
         {
          chop $_;
          print MAIL "$_\n";
         } 
        close(AM);
       }
        else
        {
          print <<__W4__;
    
    Thank you for your submission. I will be
    MAIL "getting in touch with you soon.
    
    __W4__
        }
      &close_mail;
     }
    
    ##################################################################
    CONFIRMATION PAGE CODE:
    Code:
    <HTML>
    <BODY BGCOLOR="#FFFFFF">
    
      <CENTER>
    
        <H1>Thank you!</H1>
    
        Your submission has been accepted
    
      </CENTER>
    
    </BODY>
    </HTML>
    IDEX PAGE CODE:
    Code:
    <HTML>
    <BODY BGCOLOR="#CCCCCC">
    <CENTER>
    <FONT FACE="ARIAL" SIZE="5">BIGNOSEBIRD.COM's
    
    ALL PURPOSE / ALL FUNCTION
    
    FORM HANDLER</FONT>
    
    with auto e-mail reply!
    </CENTER>
    
    
    
    
    <FORM METHOD="POST" ACTION="/cgi-bin/bnbform.cgi">
    <PRE>
     
     FIELDS MARKED WITH * ARE REQUIRED!
    
     Your Name:*          <INPUT TYPE="TEXT" NAME="name" SIZE=35 MAXLENGTH=50>
    
     Country:*            <INPUT TYPE="TEXT" NAME="country" SIZE=35 MAXLENGTH=50>
    
     E-Mail Address:*     <INPUT TYPE="TEXT" NAME="submit_by" SIZE=35 MAXLENGTH=50>
    
     Add to Mailing List: <INPUT TYPE="RADIO" NAME="mailing_list" VALUE="YES" CHECKED>Yes
                          <INPUT TYPE="RADIO" NAME="mailing_list" VALUE="NO">No
    
     Which fruit(s) do    <INPUT TYPE="CHECKBOX" NAME="grape">Grape
        like              <INPUT TYPE="CHECKBOX" NAME="banana">Banana
                          <INPUT TYPE="CHECKBOX" NAME="apple">Apple
    
     How did you find us: <INPUT TYPE="TEXT" NAME="how_found" SIZE=35 MAXLENGTH=50>
                          <INPUT TYPE="submit" VALUE="Send Mail!"><input type="reset" value=" Clear-Form">                                                         
    </PRE>
    
    
    <INPUT TYPE="HIDDEN" NAME="required" 
        VALUE="name,country,submit_by">
    <INPUT TYPE="HIDDEN" NAME="data_order" 
        VALUE="name,country,submit_by,mailing_list,how_found,
               grape,banana,apple">
    <INPUT TYPE="HIDDEN" NAME="submit_to" VALUE="[email protected]">
    <INPUT TYPE="HIDDEN" NAME="autorespond" VALUE="yes">
    <INPUT TYPE="HIDDEN" NAME="automessage" VALUE="mymessage.txt">
    <INPUT TYPE="HIDDEN" NAME="outputfile" VALUE="form.log">
    <INPUT TYPE="HIDDEN" NAME="form_id" VALUE="My Test Form">
    <INPUT TYPE="HIDDEN" NAME="ok_url" 
         VALUE="http://domain.com/test/thanks.html">
    <INPUT TYPE="HIDDEN" NAME="not_ok_url" 
         VALUE="http://domain.com/test/oops.html">
    
    
    </FORM>
    
    </BODY>
    </HTML>
    ERROR PAGE CODE:
    Code:
    <HTML>
    <BODY BGCOLOR="#FFFFFF">
    
      <CENTER>
        You did not complete all of the required fields
    
           Please use CLICK HERE to back. 
    
      </CENTER>
    
    </BODY>
    </HTML>
    Enjoy!

  5. #15
    Join Date
    Aug 2005
    Posts
    16

    Default

    has anyone tried the cgi code above?? does it work on bizhat?? i badly need a form processor with file (image) upload support ..

  6. #16
    Join Date
    Nov 2005
    Posts
    177

    Default Does bizhat support perl ?

    I think that the above cgi code need Perl to be present on the server and bizhat doesnt support perl ?

    The only way is to use php which is very powerful

    Php : not available for neebies as said by nokia

    Then how can we create forms in bizhat ??

  7. #17
    Join Date
    Jan 2006
    Posts
    5

    Default

    Wow, that code must have taken you a long time, unless you are like, a pro at CGI...

  8. #18
    Join Date
    Aug 2005
    Posts
    16

    Default

    yes pls.. how do we create forms in bizhat ?? admin pls.

  9. #19
    Join Date
    Aug 2004
    Location
    USA
    Posts
    996

    Default

    Use an HTMl editor and PHP editor (Frontpage 2003) and make forms from those forms given in this topic.

    You can download Frontpage at my Portal www.cfe-clan.com you must register to download it.

    http://ftp.cfe-clan.com/software/contact.zip

    Is an example of an email script that I made, and you can probably look off of everything and edit it to your hearts content.

  10. #20
    Join Date
    Nov 2005
    Location
    AT DORRS NEAR HEAVEN
    Posts
    2,074

    Default

    Quote Originally Posted by CFE_aAa_FeLoNy
    Use an HTMl editor and PHP editor (Frontpage 2003) and make forms from those forms given in this topic.

    You can download Frontpage at my Portal www.cfe-clan.com you must register to download it.

    http://ftp.cfe-clan.com/software/contact.zip

    Is an example of an email script that I made, and you can probably look off of everything and edit it to your hearts content.
    thanks cfe ur wesite looks huge.
    i have just signed there.
    u have ur own forum.
    the style of yr login form

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •