thanx for your help, Ive got flu and all these small things seem to be
escaping my eyes. I just want to ask you a small question:

If i want this page to submit to itself and I want to test for it, would I
go about it like this:

<?
if ("Request" == $reqPaper)
{



}
?>

if my submit button code looks like this:

<input  type="submit"  name="reqPaper"  value="Request">

or is there a better way of testing this?

-----Original Message-----
From: Mark Walker [mailto:[EMAIL PROTECTED]
Sent: Monday, September 22, 2003 4:54 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] using submit button and PHP-HELP


Hi

You might like to try something like $REQUEST_URI rather than $PHP_SELF, if
you want to keep the existing parameters.  However, in forms, it's better to
redeclare them, so in your case, you'd want to add an <input type=hidden
name=ID value=\"$ID\">

HTH

Mark

----- Original Message -----
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Sent: Monday, September 22, 2003 4:18 PM
Subject: [PHP] using submit button and PHP-HELP


> 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>
>
>
> <input  type="checkbox" value=" . $ID . " 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?
> also why doesnt the ?php echo($PHP_SELF); work???
>
> thanx in advance.
> Angelo
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to