我知道如何将数据与Get方法传递到另一个页面hiperlink另一个PHP文件:传递数据使用GET方法
{echo "<a href=file.php?variable1=".$row['value1']."&variable2=".$row['value2']."'>Confirm</a>"; }
如何从输入字段上面这条车道增加价值?可能吗?
<input name="field_name" type="text" >
我知道如何将数据与Get方法传递到另一个页面hiperlink另一个PHP文件:传递数据使用GET方法
{echo "<a href=file.php?variable1=".$row['value1']."&variable2=".$row['value2']."'>Confirm</a>"; }
如何从输入字段上面这条车道增加价值?可能吗?
<input name="field_name" type="text" >
试试这个方法:
{echo "<a href=file.php?variable1=".$row['value1']."&variable2=".$row['value2']."&field_name=".$_GET['field_name']."'>Confirm</a>"; }
在这种情况下使用$_GET['field_name']
在PHP代码中添加的输入场
的价值对于如:
<input name="field_name1" type="text" >
<input name="field_name2" type="text" >
{echo "<a href=file.php?variable1=".$_GET['field_name1']."&variable2=".$_GET['field_name2']."'>Confirm</a>"; }
根据在你的表单中method
属性的值,输入的值将是pass通过$_POST
或$_GET
阵列编辑到PHP。您可以通过下面的代码链接这PHP:
{echo "<a href=file.php?variable1=".$_GET['field_name']."&variable2=".$row['value2']."'>Confirm</a>"; }
请注意,形式应提交首先执行该代码之前。如果这不可取,那么你应该使用JavaScript。
{echo "<a href=file.php?variable1=".$row['field_name']."&variable2=".$row['field_name_etc']."'>Confirm</a>"; }
你搜索
<输入名称= “FIELD_NAME” 类型= “文本” 的值= “<?PHP的echo $ _GET [ '变量1'];?>”> – Arun