Re: Is this possible?
| From: | Kataoka Masato | Date: | Thu, 05 Jul 2001 20:39:15 +0000 |
| Subject: | Re: Is this possible? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-8134@lists.php.net to get a copy of this message | ||
Hi,
1: To execute php code when a A HREF link is clicked. I have the need to change a session variable depending on which link (of a couple) that is clicked. The link is supposed to call $PHP_SELF which then change its output depending on the value of the session variable. I know that i can solve it by letting the link call different php scripts - which update the session variable and then call back to the first page. If there is another way ( javascript maybe?), i am interested to know about it.I think what you need to do is return HTTP status of 204 (No Content). When the browser receives 204 response it will leave the screen intact, i.e., to the user nothing seems to have happened while in fact a request gets executed on the server. The code looks like this: <? header("HTTP/1.0 204 No Content"); // when using ISAPI
//header("Status: 204 No Content"); // when using CGI
?>
Masato
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.