php将循环内值传递出去 $sqltext = "select * from $dbname where $searchId like '%$keyword%'";
$link=mysql_connect("127.0.0.1","root","usbw");mysql_select_db("richardcitedpapers",$...
$link=mysql_connect("127.0.0.1","root","usbw");
mysql_select_db("richardcitedpapers", $link);
mysql_query("SET NAMES GB2312");
$searchId =$_POST["searchoption"];
$keyword =$_POST["keyword"];
$dbname =$_POST["dbname"];
$sqltext = "select * from $dbname where $searchId like '%$keyword%'";
do
{
?>
<tr align="left" bgcolor="#FFFFFF">
<td height="20" align="center"><?php echo $table->Title;?></td>
<td > <?php echo $table->Accessionnumber; ?></td>
<td align="center"><?php echo $table->Author; ?></td>
<td align="center"><?php echo$table->Issue; ?></td>
<td align="center"> <?php echo $table->Source; ?></td>
<td> <?php echo $table->Volume; ?></td>
<--
<td> <form name="search" action="456.php?" method="post" style="text-align:center">
<td> <a href=“456.php?datakey=<?php echo $table->Title; ?>" > <a/><td/>
-->
<?php
// $datakey=$table[0];
// session_start();
$datakey1=$table->Title;
$_SESSION["datakey"]=$datakey1;
//$_SESSION["searchId"]=$searchId;
// $_SESSION["dbname"]=$dbname;
// $_SESSION["result"]=$result;
global $datakey1;
// echo $datakey1;
// value="datakey"
?>
<input type="hidden" name="<? echo $table->Title; ?>" value="<?php $datakey1; ?>" id="datakey"/>
<input type="submit" value="查看详细" />
</form> </td>
<td align="center"> <?php echo $table->Title; ?></td>
</tr>
<?php
}while( $table = mysql_fetch_object($result));
?>
如何将这个我检索出来的每行结果集中的Title传递出去。谢谢 展开
mysql_select_db("richardcitedpapers", $link);
mysql_query("SET NAMES GB2312");
$searchId =$_POST["searchoption"];
$keyword =$_POST["keyword"];
$dbname =$_POST["dbname"];
$sqltext = "select * from $dbname where $searchId like '%$keyword%'";
do
{
?>
<tr align="left" bgcolor="#FFFFFF">
<td height="20" align="center"><?php echo $table->Title;?></td>
<td > <?php echo $table->Accessionnumber; ?></td>
<td align="center"><?php echo $table->Author; ?></td>
<td align="center"><?php echo$table->Issue; ?></td>
<td align="center"> <?php echo $table->Source; ?></td>
<td> <?php echo $table->Volume; ?></td>
<--
<td> <form name="search" action="456.php?" method="post" style="text-align:center">
<td> <a href=“456.php?datakey=<?php echo $table->Title; ?>" > <a/><td/>
-->
<?php
// $datakey=$table[0];
// session_start();
$datakey1=$table->Title;
$_SESSION["datakey"]=$datakey1;
//$_SESSION["searchId"]=$searchId;
// $_SESSION["dbname"]=$dbname;
// $_SESSION["result"]=$result;
global $datakey1;
// echo $datakey1;
// value="datakey"
?>
<input type="hidden" name="<? echo $table->Title; ?>" value="<?php $datakey1; ?>" id="datakey"/>
<input type="submit" value="查看详细" />
</form> </td>
<td align="center"> <?php echo $table->Title; ?></td>
</tr>
<?php
}while( $table = mysql_fetch_object($result));
?>
如何将这个我检索出来的每行结果集中的Title传递出去。谢谢 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询