|
Posted by Steff on 10/13/46 11:42
Hello everyone,
I've been wasting hours on this and I still don't know what's wrong with my
code.
Can anyone tell me what misses in this code to make the insertion work?
The set up of php apache and oracle is ok. I can select stuff from the db.
I keep on getting this message:
Warning: oci_execute() [function.oci-execute]: ORA-00984:
a column name is not authorised here c:\pageWeb\test.php on line 13
=========================================================
<html>
<head>
<title>test insert</title>
</head>
<body>
<p>test insert into db</p>
<p> </p>
<p> </p>
<form method="POST" action="test.php">
<p><input type="text" name="vegy_name" size="20"><input type="submit"
value="insert" name="B1"><input type="reset" value="reset" name="B2"></p>
</form>
<p> </p>
</body>
</html>
=========================================================
<?php
$veg=vegy_name;
$c1=oci_connect("stephane","Stef1975",$bdtest05);
$query="insert into vegetables (name) values ($veg)";
$stmt=oci_parse($c1,$query);
oci_execute($stmt, OCI_DEFAULT);
oci_free_statement($stmt);
oci_close($c1);
?>
=========================================================
thanks for looking!
Navigation:
[Reply to this message]
|