1
我使用HTML,并使用array_key_exists
当按下按钮来调用从PHP功能函数创建一个按钮,但它不会做任何事情 executeBoundSQL
距离PHP我要让我的html按钮的工作用PHP
<form method="POST" action="docAppts.php">
<!--refresh page when submit-->
<p><input type="text" name="did" size="6">
<!--define two variables to pass the value-->
<input type="submit" value="search" name="searchh"></p>
</form>
if ($db_conn) {
$result=executePlainSQL(" select * from doctor");
printResult($result);
if (array_key_exists('searchh', $_POST)) {
echo"show me";
$tuple=array(
":bind1"=> $_POST['did']
);
$alltuples=array(
$tuple
);
echo "<br> print table <br>";
// executePlainSQL("Drop table :tablname");
//echo':tablename';
$result=executeBoundSQL("select * from doctor where did=:bind1", $alltuples);
printResult1($result);
// Create new table...
//echo "<br> creating new table <br>";
//executePlainSQL("create table tab1 (nid number, name varchar2(30), primary key (nid))");
OCICommit($db_conn);
} }
感谢,这是如此的帮助,我只是PHP –
的初学者刚问另外一个问题,如果你能帮助它会感激http://stackoverflow.com/questions/37800431/displaying-all-records- IN-A-语句PHP –