Re: actualy result of problem with formfieldvalues under Suse 8.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI
Am Donnerstag, 19. Juni 2003 23:54 schrieb Ruprecht Helms:
> On Thu, 2003-06-19 at 23:30, Thorsten Körner wrote:
> > Hi
> >
> > Am Donnerstag, 19. Juni 2003 23:21 schrieb Ruprecht Helms:
> > > Hi,
> > >
> > > in the meantime I set the value of register_globals = off
> > > the next to on.
> > >
> > > I get the same result. The following script I use for testing the
> > > formfieldvalues
> > >
> > > <?
> > > echo $begriff
> > > ?>
> >
> > As I said before, this the wrong way. You should leave
> > register_globals=off and acces your data this way:
> > <?php
> > echo $_POST['begriff'];
> > ?>
>
> Ok  here the copy of my script in original
>
> <?
> echo $begriff;
> ?>
>
> That is all
>
> > Your second mistake was to forget the ";" and the end of the "echo"-line
> > <?php
>
> echo $_POST['begriff'];
> ?>
> Your second mistake was to forget the ";" and the end of the "echo"-line
>
> > > The value I take from a normal formfield by the default transfermethod.
> >
> > What the heck do you mean with default. You should always set:
>
> <html>
> <head>
>   <title></title>
>   <meta http-equiv="Content-Type" content="text/html;
> charset=ISO-8859-15">
>   <meta name="GENERATOR" content="Quanta Plus">
> </head>
> <body>
> <form action="formtest.php" method="POST">
							^^^^^^^^^^^^^
Your Form-Method is POST

>                                       <input type="text"
> name="begriff"><br>
   ^^^^^^^^^^^^^^^
this is the name of your Formfield.
> <input type="submit" value="senden">
>                                     </form>
> </body>
> </html>

PHP gives all form-data in an array to th script. With method="POST" this 
array is named "$_POST" You can now access this data in your script the 
following way:
<?php
    echo $_POST['begriff'];
?>

You can see the arrays $_GET, $_POST, $_COOKIE and so on as associative arrays 
with the fieldnames as indizes.
>
> > > After switching to the php-script I get a blank page without the value
> > > I inserted into the textfield.
>
> This problem I have first by upgrading to 8.2.
> Attached my php.ini
This should be OK.

CU
Thorsten

-- 
Thorsten Körner		http://www.123tkShop.org

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



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux