我想将选择表格中的值传递到URL以便使用iframe解决方案连接到外部网站。如何将参数传递给选择表单中的URL?
我很喜欢新的.PHP & JavaScript。请帮助我。
这是我创建的用于从用户获取数据传递到特定URL的表单。
<form action="selectcourier.php" method="GET">
<h1>Select courier service</h1>
<select>
<option value="Select">Select Courier Service</option>
<option value="1">DTDC</option>
<option value="2">AFL</option>
<option value="3">BlueDart</option>
</select>
Consignment Number: <input type="text" name="cNum"><br>
<center><input type="submit"></center>
</form>
selectcourier.php
<body>
<form><center><h3><a href="http://dtdc.com/tracking/tracking_results.asp?action=track&sec=tr&ctlActiveVal=1&Ttype=awb_no&strCnno=H60874238&GES=N&TrkType2=awb_no&strCnno2=<?php echo $_GET["cNum"]; ?>" target="ifrm"> CONFIRM </a><h3></center>
<iframe id="ifrm" width=300 height=300 seamless src="http://example.com/">
</body>
我的问题:
希望你能明白,我想给所有快递跟踪服务从权我的网站使用iframe。但在这里,我无法区分不同类型的快递服务的适当URL以传递值(cNum)并在iframe中打开该链接。
我拥有所有快递服务的所有网址。
现在,当用户选择快递服务时,如何区分它们以选取合适的URL?
请帮助我。谢谢。
所以基本上你希望用户能够选择一个快递跟踪服务,然后该网站应该加载内部框架? – icecub
在处理从“选择”菜单中选择的选项的iframe中有一些数据库代码 – RamRaider
@icecub:感谢您的回复。是的,我说得对。 – vIJAy