![](/img/trans.png)
[英]How to pass boolean values between PHP, HTML forms, and Javascript
[英]how to pass values between tabs in a html page using php
如何使用 php 在 html 中的選項卡之間傳遞值/變量
我有 3 個選項卡,它們是從數據庫中獲取的。 每個選項卡都有單獨的 ID。
<div class="tab-nav">
<?php while ($row1 = mysql_fetch_array($result1)) : ?>
<a href="vacancies.php?id=<?php $row1['id']; ?>" class="active"><?php $row1['name']; ?></a>
<?php endwhile ?>
</div>
標簽
<div class="tab-holder">
<div class="tab">
<table class="table table-striped">
<thead>
<tr>
<th width="34%">Job Title</th>
<th width="15%">Experience</th>
<th width="29%">Location</th>
<th width="8%">Salary</th>
<th width="7%"></th>
</tr>
</thead>
<tbody>
<?php
while($row = mysql_fetch_array($result)) {
$cat = $row['cat'];
if ($cat =='6') {
$jobtitle = $row['vVacjobtitle'];
?>
<tr>
<td>
<span class="pill medium green"><?php echo $row['vVacjobtitle'] ?></span>
</td>
<td><?php echo $row['experience'] ?></td>
<td><?php echo $row['vVacLocation'] ?></td>
<td><?php echo $row['salary'] ?></td>
<td>
<a href="post_resume.php?c=<?php echo $jobtitle; ?>">Apply</a>
</td>
</tr>
<?php
}
} ?>
</tbody>
</table>
</div>
單擊選項卡時如何獲取 id
如果 ($cat == 6)
我想把 id 放在 6 的位置
提前致謝 .. :)
由於您將id
的值作為 GET 參數傳遞,因此您可以在 PHP 代碼中通過$_GET['id']
訪問它
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.