SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello All,

    I want to be able to upload image files into a form I am placing on a calendar via "pop up" window.

    I am trying to allow those who want their events to be posted to upload an image of a certain size into the form so I can include it into the calendar listing.

    1. What form element should I use to do this?
    2. Are there any "free" services which allow for this feature in their forms?
    3. Do I need special coding to do this?
    4. How can I limit the size of the image?
    5. How do I limit the image type to .gif and .jpg files?
    6. Is there any place on the web with infomation about this "upload" feature in forms?

    Any and all help appreciated.

    WP
    Webbing Along!!!

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi WP,

    I'm a little confused as to what you really want to do...but...
    There is a

    <input type='file' value='*.jpg,*.gif' name='uploadedImg'>

    html tag that will produce a 'browse' button and allow the user to upload a file to your site. The problems:
    1) You cannot limit the file type and size. That is, the user can upload anything from a virus to a 10 gigabyte file.
    2) You must have write rights to your server. In other words, if you are using a free server, check with your ISP (AOL allows you to designate a directory as an upload area)


    When you say you want to put it in your form: Do you mean something like:

    <td><img src= uploadedImg></td>

    or as a file attachment that is sent along with the form?

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  3. #3
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    V Puglia,

    Thanks for responding.

    Everytime I post or just browse this forum I learn something.

    I just learned how to get only .gif and .jpg files uploaded by looking at the code you left.

    I want to include a file upload option in a form. Please see a non-functioning form at,
    http://members.nbci.com/questions_to...ostrequest.htm

    I am kinda learning this "upload" thing in backwards motion. Thanks also for the tip in finding out about the "Uploading file" policy with the Web Host as well as the dangers of uploading files.


    I have placed the form code below. Now I have to figure it out on the Server end. This is how I would like it to look. Most of what I have read today said I needed to create a directory for the uploaded files. Looks like it is going to be complex but fun to learn.

    If you know of any good tutorials about the server side of processing forms would appreciate the references.
    [code]
    <CENTER>

    <TABLE BORDER="3" CELLPADDING="2" CELLSPACING="0" WIDTH="450" BORDERCOLOR="#000000" BGCOLOR="#FFFFFF">
    <TR>
    <TD>

    <TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0" WIDTH="450" BGCOLOR="#FFFFFF">
    <TR>
    <TD WIDTH="450" ALIGN="center" BGCOLOR="#FFFFFF">
    <FONT FACE="comic sans ms" SIZE="6" COLOR="#A80030">
    <B>ADD YOUR EVENT</B>
    </FONT>
    </TD>
    </TR>
    </TABLE>

    <FORM METHOD="post" ACTION="http://server.com/cgi/handle" ENCTYPE="multipart/form-data">


    <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="450" BGCOLOR="#FFFFFF">
    <TR>
    <TD>

    <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="450" BGCOLOR="#FFFFFF">
    <TR>
    <TD COLSPAN="4" WIDTH="450" ALIGN="center" bgcolor="#000000">
    <FONT FACE="comic sans ms" SIZE="3" COLOR="#FFFFFF">
    <B>YOUR INFORMATION</B>
    </FONT>
    </TD>
    </TR>
    <TR>
    <TD ALIGN="center" WIDTH="150" BGCOLOR="#A80030">
    <FONT FACE="arial" SIZE="2" COLOR="#FFFFFF">
    <B>YOUR NAME</B>
    </FONT>
    </TD>
    <TD COLSPAN="3" ALIGN="left" WIDTH="300" BGCOLOR="#A80030">
    <INPUT TYPE="text" NAME="name" SIZE="37" VALUE="">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="center" WIDTH="150" BGCOLOR="#A80030">
    <FONT FACE="arial" SIZE="2" COLOR="#FFFFFF">
    <B>YOUR E-MAIL</B>
    </FONT>
    </TD>
    <TD COLSPAN="3" ALIGN="left" WIDTH="300" BGCOLOR="#A80030">
    <INPUT TYPE="text" NAME="email" SIZE="37" VALUE="">
    </TD>
    </TR>
    <TR>
    <TD COLSPAN="4" ALIGN="center" WIDTH="450" HEIGHT="10" BGCOLOR="#A80030">
    </TD>
    </TR>
    <TR>
    <TD COLSPAN="4" WIDTH="425" ALIGN="center" BGCOLOR="#000000">
    <FONT FACE="comic sans ms" SIZE="3" COLOR="#FFFFFF">
    <B>EVENT INFORMATION</B>
    </FONT>
    </TD>
    </TR>
    <TR>
    <TD ALIGN="center" WIDTH="150" BGCOLOR="#FFFFFF">
    <FONT FACE="arial" SIZE="2" COLOR="#000000">
    <B>CITY</B>
    </FONT>
    </TD>
    <TD ALIGN="center" WIDTH="175" BGCOLOR="#FFFFFF">
    <INPUT TYPE="text" NAME="city" SIZE="20" VALUE="">
    </TD>
    <TD ALIGN="center" WIDTH="75" BGCOLOR="#FFFFFF">
    <FONT FACE="arial" SIZE="2" COLOR="#000000">
    <B>STATE</B>
    </FONT>
    <BR>
    <FONT FACE="arial" SIZE="1" COLOR="#000000">
    <B>(Abbr.)</B>
    </FONT>
    </TD>
    <TD ALIGN="center" WIDTH="50" BGCOLOR="#FFFFFF">
    <INPUT TYPE="text" NAME="state" SIZE="2" VALUE="">
    </TD>
    </TR>
    </TABLE>

    <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="450" BGCOLOR="#FFFFFF">
    <TR>
    <TD ALIGN="center" WIDTH="150" BGCOLOR="#FFFFFF">
    <FONT FACE="arial" SIZE="2" COLOR="#000000">
    <B>EVENT DATE(s)</B>
    </FONT>
    </TD>
    <TD ALIGN="center" WIDTH="75" BGCOLOR="#FFFFFF">
    <FONT FACE="arial" SIZE="2" COLOR="#000000">
    <B>FROMBR> mm/dd/yy</B>
    </FONT>
    </TD>
    <TD ALIGN="left" WIDTH="75" BGCOLOR="#FFFFFF">
    <INPUT TYPE="text" NAME="date_starts" SIZE="8" VALUE="">
    </TD>
    <TD ALIGN="center" WIDTH="75" BGCOLOR="#FFFFFF">
    <FONT FACE="arial" SIZE="2" COLOR="#000000">
    <B>TOBR> mm/dd/yy</B>
    </FONT>
    </TD>
    <TD ALIGN="left" WIDTH="75" BGCOLOR="#FFFFFF">
    <INPUT TYPE="text" NAME="date_ends" SIZE="8" VALUE="">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="center" WIDTH="150" BGCOLOR="#FFFFFF">
    <FONT FACE="arial" SIZE="2" COLOR="#000000">
    <B>EVENT NAME</B>
    </FONT>
    </TD>
    <TD COLSPAN="4" ALIGN="left" WIDTH="300" BGCOLOR="#FFFFFF">
    <INPUT TYPE="text" NAME="event_name" SIZE="37" VALUE="">
    </TD>
    </TR>

    <TR>
    <TD ALIGN="center" WIDTH="150" BGCOLOR="#FFFFFF">
    <FONT FACE="arial" SIZE="2" COLOR="#000000">
    <B>EVENT</B>
    </FONT>
    </TD>
    <TD COLSPAN="4" ALIGN="left" WIDTH="300" BGCOLOR="#FFFFFF">
    <TEXTAREA ROWS="4" NAME="event_description" COLS="34">
    Webbing Along!!!

  4. #4
    ********* Addict DLG_1's Avatar
    Join Date
    Jun 2000
    Location
    Texas, USA
    Posts
    596
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i don't think that value attribute within the type=file works on netscape.





    Sam

  5. #5
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by DLG_1
    i don't think that value attribute within the type=file works on netscape.
    Sam
    Hello,

    Thanks!! I will check it out.

    WP

    Webbing Along!!!


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
  •