Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/271.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
Php 如何在地址栏中显示单击的表行id_Php_Mysql_Iframe - Fatal编程技术网

Php 如何在地址栏中显示单击的表行id

Php 如何在地址栏中显示单击的表行id,php,mysql,iframe,Php,Mysql,Iframe,我有一个基于PHP的求职网站。我在下表中回显数据库中的所有作业。当我单击表行中的作业时,它会在表旁边的iframe中显示作业详细信息 这是表和iframe index.php的代码 我希望当我单击表行中的作业时,地址栏应该包含作业的id。因为如果有人想分享这份工作,那么他们应该只发送特定工作的地址 现在是这样 我希望它看起来像这样 您想更改当前行为-删除iframe并让链接将用户带到一个新页面,其中包含正确的作业信息?请尝试链接到另一个页面,而不是iframe,如果你想在同一页面中显示,请尝试使

我有一个基于PHP的求职网站。我在下表中回显数据库中的所有作业。当我单击表行中的作业时,它会在表旁边的iframe中显示作业详细信息

这是表和iframe index.php的代码

我希望当我单击表行中的作业时,地址栏应该包含作业的id。因为如果有人想分享这份工作,那么他们应该只发送特定工作的地址

现在是这样

我希望它看起来像这样


您想更改当前行为-删除iframe并让链接将用户带到一个新页面,其中包含正确的作业信息?请尝试链接到另一个页面,而不是iframe,如果你想在同一页面中显示,请尝试使用ajax,并使用HTML5历史记录修改你的url APIThank@AbdullaChozhimadathil,你能告诉我如何将其更改为ajax吗?请参阅此提琴
<table class="table1">
    <tr>
        <td colspan="3"> 
<?php 
    include "job.header.php";
    ?>
        </td>
    </tr>
    <tr>
        <td width="30%"> 
        <div>
<?php
        require "module/job.call.php";
        ?>
        </div>
        </td>
        <td width="60%">
            <iframe name="content" src="../module/job.unclicked.php">
            </iframe>
        </td>
        <td width="20%">&nbsp;</td>
    </tr>
</table>
<?php

$result = mysqli_query($conn,"SELECT * FROM job  where approved='1' ORDER BY `CreatedTime` DESC");

echo "<table id='maintable' class='table-fill' border='0' cellpadding='0' cellspacing='0'>
<tr>
<th position='fixed' overflow='hidden' width='10%'>Job Title</th> 
<th position='fixed' width='5%'>Company Name</th>
<th width='5%'>Closing Date</th>
</tr>";

while($row = mysqli_fetch_array($result) ) {
    if (strlen($row['positiontitle']) > 20)
        $row['positiontitle'] = substr($row['positiontitle'], 0, 60) . "...";
  echo "<tr ref='job.details.php?id=".$row['id']."' target='content' class='positiontitle-link'>";
  echo "<td><font style='text-shadow: none;'>" . $row['positiontitle'] . "</font></a></td>";
  echo "<td>" . $row['companyname'] . "</td>";
  echo "<td>" . $row['closingdate'] . "</td>";
  echo "</tr>";
}
echo "</table>";
mysqli_close($conn);
?>