Re: php-db Digest 11 Feb 2002 20:12:53 -0000 Issue 1046
| From: | Frank Flynn | Date: | Tue, 12 Feb 2002 16:36:34 +0000 |
| Subject: | Re: php-db Digest 11 Feb 2002 20:12:53 -0000 Issue 1046 | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16863@lists.php.net to get a copy of this message | ||
On 2/11/02 12:12 PM, "php-db-digest-help@lists.php.net"
<php-db-digest-help@lists.php.net> wrote:
It sounds to me like you are blowing away name in the URL when you submit a
new form.
../index.php?name=My Name
Is just like clicking the submit button on a form with:
action = ../index.php method = get
When you users use a new form the arguments to ../index.php are taken from
the form not the URL - I don't think you can say
action = ../index.ph?name=My Name method = get
And certainly not:
action = ../index.ph?name=My Name method = post
But the solution is easy - just put a hidden field "name" with the value set
to "My Name" inside of each form.
Good Luck,
Frank
> From: Bzdpltd@aol.com
> Date: Mon, 11 Feb 2002 05:27:57 EST
> To: <php-db@lists.php.net>
> Subject: Forms carrying values.
>
> Hi list, hope someone can help me here.
>
> I have content management system I have designed. I am still learning php so
> help here would be appreciated.
>
> The user logs into the system, and we carry there user name over the pages
> using a link to each page with the value of their name carried over as
> follows: ../index.php?name=<?echo("$name")?>
>
> This works fine for the whole site, except when a user makes changes to a
> entry. Once they submit adding a new entry or modifying an existing one, the
> value of : ../index.php?name=My Name ends up being ./index.php?name=My
>
> It deletes the end of the name of the url, so that when the user clicks the
> link it does not really know who they are.
>
> I have used a hidden field to carry the value of the name over the pages, but
> it does not work on forms.
>
> I hope this makes some sort of sense.
>
> If anyone knows of a workaround.
>
> Thanks
>
> Barry
>