Use php script to insert into oracle database

   I am supposed to insert data into a Oracle 8i database using php.  The thing is am I not sure how i am supposed to do that.  I am supposed to make php script upload it to a server at the university go into oracle using sqlplus and somehow execute it from there..
 I made a test script
<table border="1" cellpadding="3">
  $connection = OCILogon("a6666666", "test1234");
  $stmt = OCIParse($connection, "SELECT * FROM Kebab ORDER BY Name ASC");

    print "<tr>\n";
    print "  <td>" . OCIResult($stmt, "NAME") . "  </td>\n";
    print "  <td>" . OCIResult($stmt, "PREIS") . "  </td>\n";
    print "</tr>\n";


using this table:


  Name CHAR(25),
  Preis NUMBER(3,2)

INSERT INTO Kebab VALUES ('Doener', 2.50);
INSERT INTO Kebab VALUES ('Iskender', 4.20);


The thing I dont understand ist how am I supposed to save the php .php   .txt or .sql
  while evertime I try to execute in in sqlplus  (using @filename.??? I always become so many "unknknown command" lines
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

va80Author Commented:
Please someone help me need this ASAP!!!
Giovanni GCTOCommented:

Sorry I don't understand your problem. Why don't you call it from the http server?

The PHP file ("script") works only "in" a webserver (or fromthe command line in CLI mode). What you wrote should work (althought I would have tested OCIexecute() results :D ) but requires you to run your script like this :


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.