2014-11-02 73 views

回答

3

以同樣的方式獲得任何其他輸入的值。

把它放在表單中,提交表格,然後用$_GET['fieldname'](或$_POST)。

+0

在提交表單之前,我能否以某種方式獲得該值?我的意思是我想在同一個頁面中使用它而不是另一個 – exchanger3145 2014-11-02 22:34:52

+0

@ exchanger3145 - 不適用於PHP。請參閱http://stackoverflow.com/questions/13840429/what-is-the-difference-between-client-side-and-server-side-programming – Quentin 2014-11-03 06:56:52

2

的index.php

<form action="check.php" method="POST"> 
    <input type="range" min="0" max="100" value="50" name="price"> 
    <button type="submit">Submit</button> 
</form> 

check.php

<?php 

echo $_POST['price']; 

?> 
相關問題