Versionsumstelltung PHP 4.05 auf 4.3

  • Themenstarter Themenstarter i125
  • Beginndatum Beginndatum
I

i125

Hallo zusammen,

ich bräuchte mal eure Hilfe, da ich leider noch hinterm Mond lebe, bzw in der Steinzeit, (Haben erst gerade Strom und fließend Wasser bekomenn ;-) )

hab ich bis vor kurzen noch mit der PHP Version 4.05 gearbeitet. Da sich ja in der 4.3 alles geändert hat, würde ich gerne Fragen, wie man nun die
Formular variablen an den Script übergibt.

Ach die Suche hier hab ich verwendet, leider aber nichts gefunden... Ich hoffe das ich für die Primitive Frage nicht erschossen werde.

Danke im voraus

CU

Alexander
 
?

Warte mal zum Bleistift das:

<form name="form1" method="post" action="login.php">
input type="text" name="cmd" size="70">
<input type=image src="grenze.gif" name="Submit">
</form>';

Und nun möchte ich gerne auf der login.php
die Variable cmd haben...
 
!

PHP:
$_POST['cmd'];

Guckst du hier:

HTTP POST variables: $_POST
Opomba: Introduced in 4.1.0. In earlier versions, use $HTTP_POST_VARS.

An associative array of variables passed to the current script via the HTTP POST method. Automatically global in any scope.

This is a 'superglobal', or automatic global, variable. This simply means that it is available in all scopes throughout a script. You don't need to do a global $_POST; to access it within functions or methods, as you do with $HTTP_POST_VARS.

$HTTP_POST_VARS contains the same initial information, but is not an autoglobal. (Note that HTTP_POST_VARS and $_POST are different variables and that PHP handles them as such)

If the register_globals directive is set, then these variables will also be made available in the global scope of the script; i.e., separate from the $_POST and $HTTP_POST_VARS arrays. For related information, see the security chapter titled Using Register Globals. These individual globals are not autoglobals.

;-)


Gruß

Texaner
 
Zurück