POST Problem

Kimble

Erfahrenes Mitglied
hi,
ich hab register_globals = off in der php.ini.

Aber egal ob an oder aus kommt, wenn ich Variablen per $_POST[] auslesen will kommt immer:
Code:
Method Not Allowed
The requested method POST is not allowed for the URL /eQv01/add/gbook.inc.

meine gbook.inc um die Variablen auszulesen sieht so aus:
PHP:
<?php

if( sizeof( $_POST ) == 0 ) {
	header( "Location: gbook.php" );
	exit();
}

include( "modules/m_gbook.inc" );

$name = $_POST['name'];
$topic = $_POST['topic'];
$content = $_POST['content'];
$email = $_POST['email'];

// ...

header( "Location: gbook.php" );
?>

und hier mein Forumular
PHP:
<html>
<head>
	<title></title>
	<link rel="stylesheet" type="text/css" href="style/style.css" />
</head>

<body>
<div align="center">
	<form action="add/gbook.inc" method="post" enctype="multipart/form-data">
		<table border="0" cellpadding="0" cellspacing="1">
			<tr>
				<td width="70">&nbsp;Topic:</td>
				<td width="180"><input name="topic" size="30" /></td>
			</tr>
			<tr>
				<td class="news" width="70">&nbsp;Name:</td>
				<td width="180"><input name="name" size="30" /></td>
			</tr>
			<tr>
				<td width="70">&nbsp;E-Mail:</td>
				<td width="180"><input name="email" size="30" /></td>
			</tr>
			<tr>
				<td width="70">&nbsp;Content:</td>
				<td width="180"><textarea name="content" cols="22" rows="4"></textarea></td>
			</tr>
			<tr>
				<td colspan="2" align="center">
					<input type="submit" value="add" name="submit" />
					<input type="reset" value="reset" />
				</td>
			</tr>
			<tr>
		</table>
	</form>
</div>
</body>
</html>

Wahrscheinlich ist die Loesung wieder ganz einfach, aber ich komm da nich dahinter
 
ok, hat sich erledigt.

Der Fehler war, dass die Datei gbook.inc hiess.
Nachdem ich sie in gbook.php umbenannt habe gings.

Sag ja einfaches Problem, war mal wieder zu dumm um draufzukommen :rolleyes:
 
Zurück