2017-01-03 21 views
0

フィールド値をPHPで取得しようとしていますが、取得できないようです。ポストとゲットの両方で試してみると、結果は得られません。私はそれが単純な解決策であるはずですが、私は間違いを見ることはできません。どんな助けもありがたいです。ありがとうございました!PHPで日付ピッカーの入力値を取得する

ここでは、私のreport.htmlを次のとおりです。

<HTML> 
<HEAD> 
    <meta charset="utf-8"> 
    <link rel="stylesheet" href="css/style2.css"> 
    <TITLE>SAE Report</TITLE> 
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script> 
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> 
    <script> 
    $(function() { 
    $(".datepicker").datepicker({dateFormat:'yy-mm-dd'}); 
    }); 
    </script> 

</HEAD> 
<BODY> 
<center> 
<h1>SAE Report</h1> 
</center> 
<form action = "report.php" method = "get"> 
<label>Report Type</label> 
    <select id="report"> 
     <option value="none"></option> 
     <option value="new">New SAEs Report</option> 
     <option value="cumulative">Cumulative SAE Report</option> 
    </select> 
<label>Start Date</label><input type="text" class="datepicker" id='start' > 
<label>End Date</label><input type="text" class="datepicker" id='end'> 
<input type="submit" value="Submit" id ="submit"> 
</form> 
</BODY> 

ここでは私のreport.phpです:

​​

答えて

2

あなたがHTMLでname属性が欠落しています。ちょうどそれを加えなさい:

<form action = "report.php" method = "get"> 
    <label>Report Type</label> 
    <select id="report" name="report"> 
     <option value="none"></option> 
     <option value="new">New SAEs Report</option> 
     <option value="cumulative">Cumulative SAE Report</option> 
    </select> 
    <label>Start Date</label><input type="text" name="start" class="datepicker" id='start' > 
    <label>End Date</label><input type="text" name="end" class="datepicker" id='end'> 
    <input type="submit" value="Submit" id ="submit"> 
</form> 
+0

それは働く!!ありがとう!! –

関連する問題