hallochen!
ich habe das problem das ich keine variablen mittels "post" übergeben kann. mit "get" funktioniert das ganze. ???
os= win2000 sp2 www= iis5 php= 4.2.0 als cgi
in der php.ini ist "register_globals=on"
hilfeeeeeeeeee
wenn Du
<?
phpinfo();
?>
aurufts steht dann da auch bei register_globals on ?
(Will nur sicher gehen, daß die php.ini in die Du schaust, jene ist die auch aktiv ist.
Ups jetzt seh ich's erst IIS - wie grindig :D
jo das ist schon die richtige php.ini. zur beruhigung in der ausgabe von phpinfo steht auch register_globals auf on.
Und jetzt bitte den Skriptteil mit dem Form.
also...
das ist nicht von mir geschrieben, bin "nur" der server admin.
das formular wird in einer include datei definiert, hier ist der ausschnitt
----------------------------------------------------------------------------<table width="710" border="0" cellspacing="0" cellpadding="0" height="100">
<tr bgcolor='#FF9900'>
<td height="25"> </td>
<td width="160" height="25"> </td>
<td rowspan="2" width="450"> </td>
<td rowspan="2" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"> </td>
</tr>
<tr align="right">
<td><img src="images/logooben.gif" border="0"></td>
</tr>
</table>
</td>
</tr>
<tr bgcolor='#FF9900'>
<td height="40"> </td>
<td width="160" height="40"> </td>
</tr>
</table>
</td>
</tr>
<tr align="center" valign="middle">
<td height="80%">
<form action="index.php" method="post" name="falsch" target="_self">
<input type="hidden" name="go" value="true">
<table width="250" border="0" cellspacing="0" cellpadding="0" height="100" bgcolor="#FF9900">
<tr>
<td width="2%"> </td>
<td width="27%"> </td>
<td colspan="2" width="46%"><span class ="text11px"><?echo $error;?></span><img src="images/space.gif" width="1" height="1" border="0"></td>
<td width="6%"> </td>
</tr>
<tr valign="bottom">
<td width="2%"> </td>
<td width="27%"><span class="text11px-bold">Login:</span></td>
<td width="46%">
<input type='text' name='login' value='' size="15">
</td>
<td width="19%"> </td>
<td width="6%"> </td>
</tr>
<tr>
<td colspan='5'><img src="images/space.gif" width="1" height="3" alt="" border="0"></td>
</tr>
<tr valign="bottom">
<td width="2%"> </td>
<td width="27%"><span class="text11px-bold">Password:</span></td>
<td width="46%">
<input type='password' name='pass' size="15">
</td>
<td width="19%">
<input type='image' src='images/login.gif' border='0' width='40' height='16' name='logcheck' align="bottom">
</td>
<td width="6%"> </td>
</tr>
<tr>
<td width="2%"> </td>
<td width="27%"> </td>
<td width="46%"> </td>
<td width="19%"> </td>
<td width="6%"> </td>
</tr>
</table>
</form>
</td>
</tr>
<tr align="center" valign="bottom">
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor='#FF9900'>
<td colspan="2">
<table width="790" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor='#FF9900'>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor='#FF9900'>
<td><img src="images/space.gif" width='30' height='7' border='0'></td>
</tr>
<tr>
<td align="right"><img src="images/interactivetools.gif" width="230" height="22" alt="" border="0"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
---------------------------------------------------------------------------------
so das zum ersten und jetzt kommt die index.php
-----------------------------------------------------------------------------------
if($go=="true" AND $pass!="" AND $login!=""){
$sql = "SELECT * FROM login WHERE login='".$login."'";
$res = @mysql_query($sql, $linkcon);
$arrResult = @mysql_fetch_array($res);
$pass_verg = $arrResult["passwort"];
$logi_verg = $arrResult["login"];
$wahl = $arrResult["ID"];
$oldzeit = $arrResult["time"];
if ($pass==$pass_verg AND $login==$logi_verg){
$uhr = time($uhr);
$sql = "UPDATE login SET time = '".$uhr."' WHERE ID =".$arrResult["ID"];
$res = @mysql_query($sql, $linkcon);
$IDnewslogin = $uhr."_ID125654dbk_56247";
//$IDnewslogin nur zum einstieg wichtig anschliessend ohne bedeutung es interessiert nur $uhr!!!!!!!!!
}
else{
$error = "Login fehlgeschlagen!";
}
}
@mysql_close($linkcon);
if($IDnewslogin==""){
$IDnewslogin="";
include("_indexhtml.inc");
}
elseif(strstr($IDnewslogin,"_ID125654dbk_56247")!=""){
// alles okay ? dann frameset laden und weitergabe der parameter
include("_indexhtmlgo.inc");
}
-----------------------------------------------------------------------------------
der effekt ist jetzt dieser: ich verändere oben im formular die methode "post" in "get" und schon gehts
ABER es soll mit post funktionieren. komisch komisch
Stimmt es gibt keinen wersichtlichen Grund, warum das nicht funktionieren sollte - es ist suspekt, ich kann nix finden.
; - register_globals = Off [Security, Performance]
; Global variables are no longer registered for input data (POST, GET, cookies,
; environment and other server variables). Instead of using $foo, you must use
; you can use $_REQUEST["foo"] (includes any variable that arrives through the
; request, namely, POST, GET and cookie variables), or use one of the specific
; $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"], depending
; on where the input originates. Also, you can look at the
; import_request_variables() function.
Was passiert, wenn Du, obwohl register_globals on gesetzt ist, die Variablenschreibweise änderst? Funzt es dann wenigstens?
Ich weiß, das ist vorallem, wenn man vorhandene Skripte migrieren will nicht die Lösung.
// entweder
$go = $_POST["$go"];
$login = $_POST["$pass"];
$login = $_POST["$login"];
if($go=="true" AND $pass!="" AND $login!=""){
// oder eben ...
if($_POST["$go"]=="true" AND $_POST["$pass"]!="" AND $_POST["$login"]!=""){
Des Verhalten ist mir unerklärlich. Ich nehme an es liegt irgendwie mit Deiner Kombination IIS - PHP zusammen. An PHP liegt es nicht. Ich habe aber leider keine Erfahrung mit dieser Kombination und ich befürchte Dir nicht weiterhelfen zu können, denn die PHP-Einstellungen sind in Ordnung.
hab auf dem iis "urlscan" am laufen, welches post verhindert hat. jetzt funzt es !!!! trotzdem vielen dank für deine schnelle hilfe