Re: uploading files... necessary Ajax?
| From: | Jochem Maas | Date: | Wed, 21 Nov 2007 13:06:17 +0000 |
| Subject: | Re: uploading files... necessary Ajax? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264902@lists.php.net to get a copy of this message | ||
pere roca wrote:
> Hi, a basic question:
> I want to send a CSV file and some other parameters. In my FORM I have
> method=POST input type="file" and
> action="http://....php"; It sends it to
> the php file but I don't want the php to be visualized (in fact it just
> works with the data and inserts in database). I want to keep the original
> HTML and the php working "in the background".
>
> Is for that absolutely necessary Ajax?
no.
have a look at the various HTTP status codes you can return to the browser:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
one of the following should do it, although a little further discussion as
to which is the best choice (and/or the correct choice) might be worthwhile:
204 No Content
202 Accepted
one of the following probably will do it too, although I don't think
that their use in the described context is as correct as 204 or 202.
304 Not Modified
201 Created
>
> thanks,
> Pere