【问题标题】:How to link two pages htm with click button?如何用点击按钮链接两个页面html?
【发布时间】:2012-08-28 22:01:36
【问题描述】:

我有这个代码:

        <a href="init.php">

        <input name="Submit" type="submit" class="Style9" value="Se connecter" onclic= "<?php include("D:/EasyPHP-5.3.3.1/www/conn.php"); ?> " /></a>

我想在点击按钮后调用conn.php并传递给页面init.php 在这里我可以调用 conn.php 但我无法传递给 init.php

【问题讨论】:

  • 最好的方法是使用 form action="init.php" 并在该文件中包含 conn.php

标签: php html button onclick


【解决方案1】:

试试这个:

<form method="POST" name="test" action="init.php">
  <input type="submit" name="Submit" class="Style9" value="Se connecter" />
</form>

然后在init.php中,包含conn.php文件。

<?php include("D:/EasyPHP-5.3.3.1/www/conn.php"); ?>

【讨论】:

  • 您到底想做什么?如果您显示 conn.php 中发生的事情可能会有所帮助
猜你喜欢
  • 2015-10-10
  • 1970-01-01
  • 1970-01-01
  • 2011-01-24
  • 2019-11-29
  • 1970-01-01
  • 2015-01-16
  • 2018-02-23
  • 1970-01-01
相关资源
最近更新 更多