Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: PHP Upload Form

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

    Default

    k thnx boogyman! (who knew the boogyman could be so helpful... because usually ure afraid of the boogyman... hiding in the closet or under the bed, or inside the peice of pie ...) lol...
    I'll try it out! thanks!
    Last edited by Rockonmetal; 09-03-2007 at 08:08 PM.

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

    Default

    Ok I finally got to test out the code... I think I understand it but its not working...
    PHP Code:
    <html>
    <body>
    <form action="report.php" method="post">
    <input type="submit">
    </form>
    <?php
    function writeIt(){
        echo 
    "Hi";
    }
    //Function which says write this..
       
    if( !$errors ) {
          return 
    writeIt();
      }
    //If button is pressed perform function named writeIt
       
    else {
         echo 
    "Data could not be stored...";
      }
    //Error message above...
    }  
    ?>
    </body>
    </html>
    I went simple because I usually go simple then start to expand... I have no idea how to do this...
    Thanks for helping...

  3. #13
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Quote Originally Posted by Rockonmetal View Post
    PHP Code:
    <html>
    <body>
    <form action="report.php" method="post">
    <input type="submit">
    </form>
    <?php
    function writeIt(){
        echo 
    "Hi";
    }
    //Function which says write this..
       
    if( !$errors ) {
          return 
    writeIt();
      }
    //If button is pressed perform function named writeIt
       
    else {
         echo 
    "Data could not be stored...";
      }
    //Error message above...
    }  
    ?>
    </body>
    </html>
    there is confusion inside this code.. you are trying to do the form and the write... the function writeIt() as you have it here would ened to be in the "report.php"

    from there.. I made it so that the errors were put into an array, and on
    if( !$errors )
    checks to see if there is anything in that array. so you would need to change that line to fit your script personally. however you are handling the errors.

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

    Default

    K... I'll try this... thanks

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
  •