Denzelq
Denzelq

Reputation: 53

jQuery form plugin and PHP file uploads tutorial questions

I found nice tutorial about jquery php file upload but my knowledge is`t that well because i dont know where put these samples of code... and what is xml file ?

i have 2 files :

1-named kontakt.php with body of the simple contact form body

<form action="contact.php" method="post" id="my-form" enctype="multipart/form-data">

2-file named contact.php to php scripts.

Im trying to do some basic operations with files with no effect. Can u write me some directions about these parts of the code because i dont recognize them wery well

Thanks

Upvotes: 0

Views: 29

Answers (1)

Sebastian Walker
Sebastian Walker

Reputation: 187

Alright, let's do this:

  1. XML stands for Extensible Markup Language. It is a markup language, similar to HTML to store general data.
  2. You put those two files on the root (main) directory on a webserver.
  3. The code you posted up top isn't the complete contact form HTML. Use the whole code from the tutorial.

    <div id="container"> <form action="process.php" method="post" id="my-form" enctype="multipart/form-data"> <p>E-mail<br /> <input type="text" name="email" id="email" /></p> <p>File<br /> <input type="file" name="upload" id="upload" /></p> <p><input type="submit" value="Submit" /></p> </form> </div> <div id="output"></div>

  4. Don't name your files similarly, or you won't know which one is which 2 weeks from now. For example, use index.html for the form page and upload.php for the processing page.
  5. Otherwise, just follow the directions of the tutorial.

You might also want to check out this tutorial, I think it is a bit more clear:
http://www.w3schools.com/php/php_file_upload.asp

Upvotes: 1

Related Questions