私はいくつかのページを持っており、入力が送信されると、url 変数をチェックする php ファイルに移動します。これは executeeffects.php?option=blockuser の可能性があります。
しかし、ページに移動すると、executeeffects phpファイルで「未定義」と表示されているだけです。変数が設定されているかどうかを確認するチェック機能があり、設定されている場合は1つ、設定されていない場合は別のものをエコーアウトしますが、私はしませんでしたエコーを未定義にするので、それがどこから来ているのかわかりません。コードは以下のとおりです
これがjqueryモバイルの問題なのか、それとも何か足りないのか誰か教えてもらえますか?
block.php
<!DOCTYPE html>
<html>
<head>
<title>Ryan Kelly</title>
<meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=no">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<script src="effects.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>Ryan Kelly</h1>
</div><!-- /header -->
<div data-role="content">
<label for="basic">Username:</label>
<input type="text" name="name" id="basic" value="" />
<input type="text" name="name" id="blocked" value="" />
<a href="executeeffects.php?option=block" data-role="button" class="button">Submit</a>
<?php include('listusers.php'); ?>
</div><!-- /content -->
</div><!-- /page -->
</body>
</html>
executeeffects.php
<?php
if(isset($_GET['option'])){
echo 'something is set!';
} else {
echo 'nothing is set!';
}
?>