Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/246.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何通过超链接url提交参数并在php中检索它们?_Php_Html_Mysql_Href - Fatal编程技术网

如何通过超链接url提交参数并在php中检索它们?

如何通过超链接url提交参数并在php中检索它们?,php,html,mysql,href,Php,Html,Mysql,Href,在一个while循环中携带值,每个值都是从一个SQL表中提取的,我需要在一个while循环中携带它们,因为我正在制作一个从特定客户机购买的项目列表。我将这一行用于href url: echo "<table width=1200 style align=left>"; while($row3 = mysqli_fetch_array($rs3)){ $space = array(""); $text=$row3['description']; $dash="_"; $url

在一个while循环中携带值,每个值都是从一个SQL表中提取的,我需要在一个while循环中携带它们,因为我正在制作一个从特定客户机购买的项目列表。我将这一行用于href url:

    echo "<table width=1200 style align=left>";
while($row3 = mysqli_fetch_array($rs3)){
$space = array("");
$text=$row3['description'];
$dash="_";
$url = preg_replace("![^a-z0-9]+!i", "_", $text);
$url= "".$url.".php";

echo "<tr><td colspan=2 style align=center><span class=font>" . $row3['relid'] . "</span></td><td width=132 style align=center><span class=font>" . $row3['invoiceid'] . "</span></td><td width=400 style align=center <span class=font><a href=$url>" . $row3['description'] . "</span></A></td><td width=132 style align=right><span class=font>" . $row3['amount'] . "</span></td><td width=132 style align=center><span class=font>Pendiente</span></td><td width=132 style align=left><span class=font>" . $row3['duedate'] . "</span></td></tr>";
}
mysqli_close($con3);
echo "</table>";
echo"<table width=1200>";
echo "  <tr class=font>
<td width=1200 height=22 colspan=7  background=border-green-horizontal.png>&nbsp;</td>
echo”“;
而($row3=mysqli\u fetch\u数组($rs3)){
$space=数组(“”);
$text=$row3['description'];
$dash=“389;”;
$url=preg_replace(“![^a-z0-9]+!i”、“_”、$text);
$url=”“.$url.“.php”;

echo“$row3['relid']”。$row3['invoiceid']”。修复这些语法错误,如果仍然损坏,请返回报告

<td width=400 style align=center <span class=font><a href=$url>" . $row3['description'] . "</span></a></td>

“”
编辑: 您的意思是如何将一个var附加到一个url,以便在被调用的页面上检索它? 您可以通过
echo“
将变量附加到url


在调用的页面上,您可以通过
$\u GET['id']

阅读它。那么问题在哪里?我如何实际将这些变量传递到其他形式?好的,您为什么要“传递”订单ID,来自该特定行的客户端ID,而不是该行本身的ID?然后,再次查询数据库并获取所需信息。我使用这些ID从3个不同的表中获取一些其他数据。我忘了提到它在echo上,它是一个生成表的php脚本。@ErickLeveron从
$row3中可以明显看出这一点[“说明”].
部分。你尝试语法修复了吗?我的测试服务器关闭了,我会马上修复它们,但是你能帮我处理变量吗?如果我知道问题是什么,我会的。如果你用
while
迭代行,每行将只显示一次。对不起,请尽量让你的观点更清楚。好的,我需要保存每一行的ID,这样当我更新时点击描述,它将带我进入表格,在那里我添加了一些其他信息,但是有了正确的ID,那么,我如何保存每一行ID并在下一个表格中使用它们呢?很抱歉我的回答含糊不清,我的英语真的“生锈了”。
"<td width=400 style align='center'><span class='font'><a href='$url'>" . $row3['description'] . "</span></a></td>"