English 中文(简体)
检索甄选/清单选择数值
原标题:retrieve selection / list option values PHP
  • 时间:2011-04-24 17:55:01
  •  标签:
  • php

我有一个动态的建筑甄选清单。 甄选清单中载有“清单”,说明用户在记录表格数据之前对甄选名单所作的补充。

我愿把选箱的所有价值留给一个扼杀、选择或不选择的箱子。 谁能解释一下,我如何通过甄选箱来加以利用,并用它来阐述充满活力的甄选选择的所有选择价值?

感谢您的言辞和时间

function PermitAdd() {
var formObject = document.frmJob
if (formObject.TxtPermitNr.value!="" && formObject.TxtPermitNr.value!="") {
    addOption(formObject.lstPermits,formObject.TxtPermitNr.value,formObject.TxtPermitNr.value)
iii else {
    alert("Fill permit text field ")
iii

iii

............

    <tr>
  <td width="25%">Permit #: </td>
  <td width="9%"><input name="TxtPermitNr" type="text" id="TxtPermitNr" value="<?php echo $strTxtPermitNr;?>" size="10" maxlength="20" />        </td>
  <td width="10%"><input name="button2" type="button" onclick="PermitAdd()" value="Add"/></td>
  <td width="16%"><div align="center">
    <select name="lstPermits" size="4" multiple="multiple" id="lstPermits">
    </select>
  </div></td>
  <td width="40%"><input name="button" type="button" onclick="PermitDelete()" value="Del"/></td>
</tr>

......

如今,在我的《加拿大法典》中,我把表格保存到数据库中,希望能够显示所有数值。

    $strTxtPermitArr[] = trim($_POST[ lstPermits ]);
foreach($strTxtPermitArr as $key => $value){
    $strTxtPermitNr .=  $key ." - " . $value ." ";
iii
问题回答

you can do this simple by dynamic generating hidden field with all values - just edit your PermitAdd() to

  1. add option as it does now
  2. add value to your hidden element

否则,你可在onSubmit行动中产生。

我想elect/em> 只能寄出某些价值,而不是全部。

Maybe 问题可给你一些帮助。 这类问题有许多,只是查询input array





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...