|
|||||||
Join now to share free website templates or post on the forum. If you have never been on a forum before read the
FAQ. It's quick, easy and free to join!
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I am trying to launch a PHP Function from a FORM;
Currently I am running the Action as a seperate PHP page - like below; <form enctype="multipart/form-data" action="uploadCSV.php" method="POST"> Please choose a file: <input name="uploaded" type="file" /><br /> <input type="submit" value="Upload" /> </form> But I am having difficulty returning a Success or Failure back to this PHP page - can you call a PHP function in the "action=" instead of calling a new PHP page? Thanks for any help, |
|
||||
|
You might be misunder standing php.
When someone visits your PHP webpage, your web server processes the PHP code. It then sees which parts it needs to show to visitors(content and pictures) and hides the other stuff(file operations, math calculations, etc.) then translates your PHP into HTML. After the translation into HTML, it sends the webpage to your visitor's web browser. In your case a form - the viewer fills out. (File 1) The information is sent to a php file residing on the server, which processes the information. (File 2) If all goes well the file returns Success if not Failure. (File 3 dispayed in browser, generated by File 2) Your declaration Code:
="multipart/form-data" action=" My guess would be there is a problem with the php file on your server in proccessing the input, therfore no output. There are several php commands which if coded in a page return output, as they are processed on the server side, but this not your case.
__________________
Consultant - Programmer - WebMaster cleandeck - lawn mower undercoating wilmargraphite - graphite lubricants Last edited by ishkey; 06-10-2009 at 07:38 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|