note 14352 deleted from function.header by jimw
| From: | jimw@php.net | Date: | Wed, 31 Oct 2001 22:07:10 +0000 |
| Subject: | note 14352 deleted from function.header by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19800@lists.php.net to get a copy of this message | ||
If you _really_ want to avoid caching of any kind, you should always call your scripts via POST
rather than via GET. Unfortunately, HTTP links (<a href...) are resolved using the GET method, so
you'll have to write a stupid little form to link to your PHP file, like:
<form action="myscript.php" method="POST" name="myform">
<input type=submit value="call script">
</form>
This form (didn't test it) should display a button which you can click to go to the site with
the php script.
If you don't like these buttons, you can also leave the "<input..." line away and
use a javascript link to perform the POST request. (However, keep in mind that your users must have
Javascript enabled for this method to work.) Your link should look like this:
<a href="javascript:myform.submit()">bla bla</a>
Should work on browsers of generation 5,
but isn't yet validated on Netscape 4.
To pass parameters to your script which you would normally pass in your link
(..href="script.php?PARAM=1"...), you can either add these settings directly in the
"action" part of the form declaration like usually or, if you don't like to, create
invisible controls with default values, using the "<input type=hidden..." tags.
Did this help you? Any comments? hey, why not drop me a line?
Cheers,
Daniel