php と mysql をサポートするローカルホストで apache サーバーを実行しています。唯一の問題は、$_GET
と$_POST
がまったく機能していないことです。
これは私のhtmlファイルです:
<html>
<body>
<form action="message.php" method="GET">
Enter your message here: <input type="text" name="msg" size="30">
<input type="submit" value="Send">
</form>
</body>
</html>
これは私の message.php ファイルです:
<?php
$input = $_GET('msg');
echo "$input";
?>
HTML のテキスト入力フィールドに「blablabla」と入力すると、[localhost]/message.php?msg=blablabla にリダイレクトされますが、php で空のページが表示されます。[localhost]/message.php?msg=blablabla のソースコードを調べてみたのですが、空っぽの部分と空っぽの部分しかありません。
私は間違いを犯しましたか、それともこれはバグですか?