Re: forms and variables?

From: Date: Fri, 21 Apr 2006 12:58:59 +0000
Subject: Re: forms and variables?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-234480@lists.php.net to get a copy of this message
take the following code and do some experimentation: <? echo '<pre>'; echo "POST vars: \n"; var_dump($_POST); echo "GET vars: \n"; var_dump($_GET); echo '</pre>'; ?> stick that in your page that contain the form and start playing with different form fields, different form fields names, etc, etc - everytime you submit you'll know see what's being submitted. enjoy William Stokes wrote:
Hello, Probably a stupid one but anyway... In PHP. Is it possible to point to a variable with the HTML form name by which it was posted from? Example: //point to the variable with something like or somenthing??? $AddNew.SomeVar
this is not asp.NET/asp.NOT, so "no" to that question. god only knows what you mean by the form examples below...
<form name="AddNew" method="post" action="<? $PHP_SELF ?>"> $SomeVar = "Add"; </form> <form name="DeleteOld" method="post" action="<? $PHP_SELF ?>"> $SomeVar = "Del"; </form> Or do I just have name the variables uniquely?
I would, in general, recommend calling every $x. ;-)
Thanks -Will


« previous php.general (#234480) next »