Results 1 to 5 of 5

Thread: PHP Upload Form

  1. #1
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Exclamation Upload Form *NOT SOLVED YET!*

    Hi All I am looking for a way to validate/submit & store my form without using javascript *unless absolutly nessacery or is a better choice*
    I have my form below... I can use PHP and ASP

    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>
    <script type="text/javascript" src="scripts/checkbox.js" /></script>
    <script type="text/javascript" src="scripts/checkone.js" /></script>
    <script type="text/javascript" src="scripts/formfeatures.js"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>.:: Pureadd ::.</title>
    <link rel="stylesheet" href="default.css" />
    </head>
    <body>
    <table align="center" class="table" name="Major Table" border="0" cellpadding="0" cellspacing="0">
    <tr id="topconer">
    <td style="background: transparent;" align="left" width="10"><img src="corners/left-top.png"></td>
    <td class="white" width="645"></td>
    <td style="background: transparent;" align="right" width="10"><img src="corners/right-top.png"></td>
    </tr>
    
    <tr>
    <td id="topbanner" colspan="3" class="white">
    <center><img src="banner.png" id="topbanner"></center>
    </td>
    </tr>
    <td id="menu" class="white" colspan="3" align="center">
    <ul class="menu">
    
    <li> <b>.::</b> <a href="Index.html">Home Page</a></li>
    <li> <b>::</b> <a href="Videos.html">Video Index</a></li>
    <li> <b>::</b> <a href="Pictures.html">Pictures</a></li>
    <li> <b>::</b> <a href="Audio.html">Audio Clips</a></li>
    <li> <b>::</b> <a href="Register.html">Register</a></li>
    <li> <b>::</b> <a href="Login.html">Contact Pureadd</a></li>
    <li> <b>::</b> <a href="FAQ.html">FAQ</a></li>
    <li> <b>::.</b> </li>
    
    </ul>
    </td>
    </tr>
    <tr>
    <td class="white" colspan="3" align="center" valign="top">
    <div class="pureadd">
    <fieldset><legend>Submit File</legend>
    <form action="process.php" method="post" enctype="multipart/data" class="form">
    <!-- Make sure that it validates to make sure there aren't any blank entries!!!  Thanks -->
    <input type="hidden" value="002375padd3234">
    <br>All Fields are required...  Do not leave any blank...
    <br>Your Name:
    <br><input type="text" name="Name" class="input"/>
    <br>Your Email:
    <br><input type="text" name="Email" class="input"/>
    <br>Type of File:
    <br><input type="checkbox" name="Video" /> Video
    <br><input type="checkbox" name="Picture" /> Picture
    <br><input type="checkbox" name="Audio" /> Audio
    <!--  User can only select one of the file types... -->
    <br>
    <br>Agree To Terms of Service
    <br><input type="checkbox" name="UserStatusOnTermsOfService" value="Agreed"/> Yes I Agree To the Terms of Service
    <!-- User must agree to terms of service *which was the file they came in before... they reached the form...* When Checked the form data below *inputs and button are 
    
    then visible*-->
    <br>
    <br>File Location:
    <br><input type="file" name="FILE" class="file" />
    <!-- Users can only submit file types: .jpg, .gif, .png, .mov, .mpg, .avi, or .mp3.  If they are .wav files write message "Sorry we don't accept .wav files because they are 
    
    very large but you can convert them for free using a program called switch, <a href="http://www.nch.com.au/switch/" target="_new">Switch</a>.  If it is possible to 
    
    seperate uploaded files based on file type into different folder *like picture files go into "submitions/pictures/" and videos go into "submitions/videos/" and audio files 
    
    go into "submitions/audio/" if it isn't possible *or is to hard...* just have them go into "submitions/" if it is also possible to give the file a specific name example "1" and 
    
    if that file name exists do something like add 1 to the file name or just make it "2"... probably by that ++x function...  but I don't know...-->
    <br>
    <br>File Description:
    <br>
    <br><textarea class="textarea" name="Description" rows="3" cols="50"></textarea>
    <!-- Cannot be more than 200 characters... And all characters more than 4 in a row (!!!!) long will be converted to 1 of those...  example "!!!! would become !" *if 
    
    possible*-->
    <br>
    <br>File's Title:
    <br><input type="text" name="FileTitle" class="input" />
    <!-- Again if there are 4 of the same characters make them 1 *if possible*-->
    <br>
    <br><center><input type="submit" class="input"></center>
    </form>
    </fieldset>
    Heres what I'm asking for someone to write the complete script for...
    1. The Validation *all the comments if possible*
    2. The Upload functions
    3. Add The Content typed in the input boxes to a file called data.txt *if I could edit it so it could be a table and put some other stuff in there that would be fantastic!*

    Thats all, just let me know if your going to take this on please so I don't abandon this!
    Last edited by Rockonmetal; 08-27-2007 at 04:02 AM.

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    I really need something substantial like the actual code i only got till September 8th, 2007 to put this site up and... I unfortunitly don't have time to mess around, cuz i got like, this form, database to set up and other stuff, so if someone could help me quick or should I go get a dummies book on this?

  4. #4
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    Anyone able to help me please say so because i really only got till september 8th... Thanks to anyone who helps!

  5. #5
    Join Date
    May 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Here's a tutorial for an image upload.

    http://kreoton.net/more-secure-php-i...utorial-8.html

    As far as saving it in a txt file, I have no idea.

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
  •