Ok, now I'm having another problem. I didn't know if the second insert statement had to have a different name, so I gave it the name insert2 and went through the parse etc. But when I ran it it said there was an error - an invlaid number. So then I changed it so the second insert statement was also called $insert and commeneted out all the unnecessary fault. Now, I am again getting the error:-
Warning: OCIStmtExecute: ORA-01722: invalid number in /mntdw/pgrad2/base/g/geb97/public_html/enterProject1.php4 on line 53 Array Line 53 is the line that says: $result = OCIExecute($ins_statement); Code is below <! enterProject1.php4> <?php if ($submit == "Click here to enter project") file://if a connection to the database is not made output a message if (!$connection) { echo "I couldn't make a connection!"; exit; } file://insert relevant values into the project table $insert = "insert into PROJECT values ('$projectID', '$moduleID', '$title', '$originator', '$softwareHardware', '$specialSkills', '$status', '$externalAgreement', '$background', '$tasks', '$steps', '$references')"; file://insert relevant values into projkey table $insert = "insert into PROJKEY values ('$projectID', '$keyword')"; file://formulate the query $query = "select projectID, moduleID, title, originator, softwareHardware, specialSkills, status, externalAgreement, background, tasks, steps, references from PROJECT WHERE projectID='$projectID'"; file://parse the three statements $ins_statement = OCIParse ($connection, $insert); file://$ins_statement2 = OCIParse ($connection, $insert2); $qry_statement = OCIParse ($connection, $query); file://execute the first insert statement and print error message if there is an error $result = OCIExecute($ins_statement); if (!$result) { echo OCIError($ins_statement)."<p>"; exit; } file://execute the first insert statement and print error message if there is an error file://$result2= OCIExecute($ins_statement2); file://if (!$result2) file://{ // echo OCIError($ins_statement2)."<p>"; // exit; file://} file://execute the query statement OCIExecute($qry_statement); etc. etc. etc. At 08:19 09/11/2001 +0100, you wrote: >oh, keyword is an other table ? if it is, you have to use TWO insert : >$insert = "insert into project values (...)"; >... do all stuff >$insert = "insert into keyword values (...)"; >... do all stuff > >if keyword is a field of the project table - as I thought cause I'd read >very quickly your pages -, you have to complete your first insert : >"insert into project values ('$projectID', '$moduleID', '$title', >'$originator', '$softwareHardware', '$specialSkills', '$keyword', >'$status', '$externalAgreement', '$background', '$tasks', '$steps', >'$references')" >(keyword at the good place ! in the order of the table) > >Best regards, >Philippe > > > >----- Message d'origine ----- >De : "GEORGINA ELAINE BAILEY" <[EMAIL PROTECTED]> >À : "Philippe Saladin" <[EMAIL PROTECTED]> >Envoyé : jeudi 8 novembre 2001 18:12 >Objet : Re: PHP, Oracle and HTML > > >> That was such an abvious mistake really - forgive me for being stupid. >> >> But to put it all in one $insert how would I do it. Would it be:- >> >> file://insert values into the table >> $insert = "insert into PROJECT, KEYWORD values ('$projectID', '$moduleID', >> '$title', '$originator', '$softwareHardware', '$specialSkills', >> '$status', '$externalAgreement', '$background', '$tasks', '$steps', >> '$references') AND ('$keyword)"; >> >> OR:- >> >> file://insert values into the table >> $insert = "insert into PROJECT values ('$projectID', '$moduleID', >> '$title', '$originator', '$softwareHardware', '$specialSkills', >> '$status', '$externalAgreement', '$background', '$tasks', '$steps', >> '$references') AND insert into KEYWORD values ('$keyword')"; >> >> Cheers >> >> Georgina >> >> >> >> >> At 08:53 08/11/2001 +0100, you wrote: >> >Georgina, >> > >> >"keyword" doesn't appear in your Insert sql statement in >enterproject1.php4 >> >?? >> > >> >BTW, I think it's very *dangerous* to join your files : now, we know your >> >url, and most important, the oracle home, the database password, the >oracle >> >user ... someone with bad intentions could use all these informations >.... >> > >> >Regards, >> >Philippe >> > >> >----- Message d'origine ----- >> >De : "Georgina Elaine Bailey" <[EMAIL PROTECTED]> >> >Groupes de discussion : php.db >> >À : <[EMAIL PROTECTED]> >> >Envoyé : mercredi 7 novembre 2001 21:08 >> >Objet : PHP, Oracle and HTML >> > >> > >> >> Can anyone help me? I don't expect you to run my code or anything, just >> >> take a look at the scripts. Somewhere between entering projects and >> >> searching for them something goes wrong. Regardless of which keyword >radio >> >> button I click when entering the project, it always stores it as java >when >> >> I search for it. However, it does store the right moduleID ?? >> > >> > >> >>--------------------------------------------------------------------------- >- >> >---- >> > >> > >> >> >> >> >> > >> > >> > > > >