Re: using submit button and PHP-HELP
| From: | Marek Kilimajer | Date: | Mon, 22 Sep 2003 14:36:45 +0000 |
| Subject: | Re: using submit button and PHP-HELP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163475@lists.php.net to get a copy of this message | ||
Angelo Zanetti wrote:
Hi, I have a form that has a submit button in it, when the button is pressed I want it to reload the same page, with the same URL, however when I click on the submit button, the URL that it produces is http://whatever.php? then the name of my submit button = value for example: <form action="<?php echo($PHP_SELF); ?>" type=post>^^^^^^^^^ ^^^^
register_globals ----------+ |
use $_SERVER['PHP_SELF'] instead |
|
should be "method" ------------------------+
<input type="checkbox" value=" . $ID . " name="">^^^ ^^
where is this variable set? --------+ |
|
empty name --------------------------------------+
Request this abstract! <input type="submit" value="Request" name="reqPaper"> </form> this gives a URL of: http://localhost/ebLatest/indpaper.php?reqPaper=Request instead of the previous URL that was .php?ID=110 What I want to know is why the name and value of the submit button are being displayed in the URL? Because when the submit button is clicked, the button becomes "succesfull" (official term) and the name/value pair is sent in the request.
also why doesnt the ?php echo($PHP_SELF); work??? thanx in advance. Angelo