从mysli_fetch_array中获取选定的值并输出(Get selected value from mysli_fetch_array and output)
我有一个问题是获得一个选定的值并输出它。 示例i从下拉列表中选择1001 。 当我回显它总是返回第一行的值,希望是1002 。
这是我的代码edit.php
<form id="form" action="test.php" method="post"> <?php echo "<select name=\"Reservation ID\" form=\"form\">"; while ($row = mysqli_fetch_array($result)) { $gg = $row['reserve_id']; echo "<option value='" . $gg . "' name=\"reserve_id\">" . $gg . "</option>"; } echo "</select>"; $_SESSION['reserve'] = $gg; ?> <input type="submit" name="form" value="Submit"> </form>
这是来自test.php的代码
$y = $_SESSION['reserve']; if(isset($_POST['form'])) { echo $y; }
I have a problem to get a selected value and output it. Example i select 1001 from dropdown. When I echo it always return the value from first row wish is 1002.
this my code edit.php
<form id="form" action="test.php" method="post"> <?php echo "<select name=\"Reservation ID\" form=\"form\">"; while ($row = mysqli_fetch_array($result)) { $gg = $row['reserve_id']; echo "<option value='" . $gg . "' name=\"reserve_id\">" . $gg . "</option>"; } echo "</select>"; $_SESSION['reserve'] = $gg; ?> <input type="submit" name="form" value="Submit"> </form>
this is code from test.php
$y = $_SESSION['reserve']; if(isset($_POST['form'])) { echo $y; }
原文:https://stackoverflow.com/questions/42605087
满意答案
这里的移动safari参考(android基本相同):
你想要的是:
var x = event.touches[0].pageX; var y = event.touches[0].pageY;
如果你在Android上运行,你还需要在触摸时取消touchmove事件以获取新事件。 不要问我为什么......
Here the reference for mobile safari (android is basically the same):
what you want is:
var x = event.touches[0].pageX; var y = event.touches[0].pageY;
If you are running on android you also need to cancel the touchmove event to get new ones while touching. Don't ask me why...
相关问答
更多Phonegap 环境搭建
编程与Phonegap Cordova和Phonegap Desktop相同(Is programming the same with Phonegap Cordova and Phonegap Desktop)
Phonegap SQLite 3(Phonegap SQLite 3)
了解Phonegap(Understanding Phonegap)
使用PhoneGap在Android和iPhone上使用“touchmove”事件(“touchmove” event on Android &iPhone using PhoneGap)
OpenGL与PhoneGap(OpenGL with PhoneGap)
document.addEventListener(“touchmove”,preventBehavior,false);(document.addEventListener(“touchmove”, preventBehavior, false); - prevents me using from using overflow: scroll; - work around?)
PhoneGap或Flex(PhoneGap or Flex)
Touchmove与Phonegap(Touchmove with Phonegap)
touchmove在画布上绘制两条线而不是一条线(touchmove drawing two lines instead of one on canvas)
相关文章
更多Nutch源码阅读进程3---fetch
javax.imageio.IIOException: Can't create output stream!的解决方案
报错说找不到abbrev这个方法,但Array有这个方法的吧?
Mapreduce中的RCFile输出RCFileOutputFormat实现及其应用
struts2 <s:checkbox>传值问题
请解释一下plsql中的/*+APPEND*/的意思
Hadoop控制输出文件命名
Hadoop Streaming 实战:输出文件分割
如何获取发送请求到服务器地址,然后返回一个json?
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!