[thelist] php form variables

Lez Lytollis Lez.Lytollis at ccr.ntu.ac.uk
Thu Jun 1 10:03:40 2000


Once again, Matt, you the PHP man. This worked fine, thanks.

<?
    if ($imgbtn_x) {
       // do something
   }
   else {
      // do something else
   }
?>

<TIP type="php" value="adapted from php pocket ref!">

you can check which php variables your script is receiving from a form by
using
<?
while(list($key,$value))=each($array)) {
  echo "array[$key]=$value<br>\n";
}
?>
substitute HTTP_GET_VARS, HTTP_POST_VARS or HTTP_COOKIE_VARS for "array" as
appropriate.

<bitter experience>
make sure that "track_vars" is turned on in php.ini and
make sure that your inipath is pointing to right place!
(use <?echo phpinfo() ?>)
</bitter experience>

</TIP>



----- Original Message -----
From: Warden, Matt <mwarden@odyssey-design.com>
To: <thelist@lists.evolt.org>
Sent: Wednesday, May 31, 2000 11:52 AM
Subject: Re: [thelist] php form variables


> Actually, I think you have to check for either $imgbutton.x or
$imgbutton_x
> (depending on which you get from your Web server). When you click an
submit
> image, the X and Y coordinates of the click location are given as form
> variables.
>