-
Notifications
You must be signed in to change notification settings - Fork 0
/
makeMyStuffAvail.php
55 lines (45 loc) · 1.14 KB
/
makeMyStuffAvail.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<html>
<body>
<!--
<br />
<FORM><INPUT TYPE="button" VALUE="Back" onClick="history.go(-1);return true;"></FORM>
post myperson
<?php // echo $_POST['myperson'] ;?>
post item
<?php //echo $_POST['item'] ;?>
post value
<?php //echo $_POST['value'] ;?>
<br />
-->
<?php $mylocalvar = $_POST['myperson'];
// echo "mylocalvar for using with queries = $mylocalvar";
// echo "<br/>" ;
?>
<?php
if ($db_conn=OCILogon("ora_i0r7", "a41671785", "ug")){
// echo "Connected to Oracle". "<br />";
$cmdstr = 'update item set available=\'T\' where item.i_number in (select i.i_number from item i inner join ownedby o on i.i_number=o.i_number and o.email=\'';
$cmdstr = $cmdstr . $_POST['myperson'] . '\'';
$cmdstr = $cmdstr .')';
//echo "$cmdstr \n";
//echo "<br/>";
$parsed = OCIParse($db_conn,$cmdstr);
if (!$parsed){
$err = OCIError($db_conn);
echo htmlentities($err['message']);
exit;
}
$r=OCIExecute($parsed, OCI_DEFAULT);
if(!$r){
$err = oci_error($parsed);
echo htmlentities($err['message']);
exit;
}
// echo "<br /> Data Retrieved <br />";
OCICommit($db_conn);
OCILogoff($db_conn);
}
include ('mystuff.php');
?>
</body>
</html>