I create a button using html, and using array_key_exists to call function function from php when button is pressed but it doesn't do anything executeBoundSQL is just a function from 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);
} }
Aucun commentaire:
Enregistrer un commentaire