wastedthelight Posted August 16, 2007 Share Posted August 16, 2007 Hi. I can't figure out how to send things to the database with PHP + Oracle. Never had a problem with MySQL but this switch to Oracle is just annoying (forced, no choice). I have to use odbc commands too. If anyone can code me just a 1 or 2 question form example that submits to the database that would be great! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/65224-oracle-php-form/ Share on other sites More sharing options...
Illusion Posted August 21, 2007 Share Posted August 21, 2007 Everything is given in php manual and try that by following the examples given there, if still the problem exists post what u have tried. Quote Link to comment https://forums.phpfreaks.com/topic/65224-oracle-php-form/#findComment-329821 Share on other sites More sharing options...
wastedthelight Posted August 21, 2007 Author Share Posted August 21, 2007 <?php $connect = odbc_connect("oratest", "user", "pass"); $query1 = "select * FROM NOMINATIONS"; $result = odbc_exec($connect, $query1); odbc_result_all($result); ?> <form action="index.php" method="post"> <input name="auto" type="text" id="auto" maxlength="14"> <Br /> <input name="nominee" type="text" id="nominee" maxlength="14"> <Br /> <input name="position" type="text" id="position" maxlength="14"> <Br /> <input name="department" type="text" id="department" maxlength="14"> <Br /> <input name="group" type="text" id="group" maxlength="14"> <Br /> <input name="nominator" type="text" id="nominator" maxlength="14"> <Br /> <input name="nominator_phone" type="text" id="nominator_phone" maxlength="14"> <Br /> <input name="nominator_email" type="text" id="nominator_email" maxlength="14"> <Br /> <input name="question1" type="text" id="question1" maxlength="14"> <Br /> <input name="question2" type="text" id="question2" maxlength="14"> <Br /> <input name="question3" type="text" id="question3" maxlength="14"> <Br /> <input name="question4" type="text" id="question4" maxlength="14"> <Br /> <input name="question5" type="text" id="question5" maxlength="14"> <Br /> <input name="" type="submit" value="Submit" /> </form> <?php $auto = ($_POST['auto']); $nominee = ($_POST['nominee']); $position = ($_POST['position']); $department = ($_POST['department']); $group = ($_POST['group']); $nominator = ($_POST['nominator']); $nominator_phone = ($_POST['nominator_phone']); $nominator_email = ($_POST['nominator_email']); $question1 = ($_POST['question1']); $question2 = ($_POST['question2']); $question3 = ($_POST['question3']); $question4 = ($_POST['question4']); $question5 = ($_POST['question5']); odbc_execute("insert into NOMINATIONS SET nominee = '$nominee', auto = '$auto', position = '$position', department = '$department', group = '$group', nominator = '$nominator', nominator_phone = '$nominator_phone', nominator_email = '$nominator_email', question1 = '$question1', question2 = '$question2', question3 = '$question3', question4 = '$question4', question5 = '$question5'"); ?> And honestly, i dont think i HAVE to use odbc_, i think the guy just said it was easier or something? i already officially hate oracle, lol. Any help would be great. thanks. Quote Link to comment https://forums.phpfreaks.com/topic/65224-oracle-php-form/#findComment-329944 Share on other sites More sharing options...
Illusion Posted August 22, 2007 Share Posted August 22, 2007 why don't use oracle instance(oci) insted of odbc. Quote Link to comment https://forums.phpfreaks.com/topic/65224-oracle-php-form/#findComment-330715 Share on other sites More sharing options...
wastedthelight Posted August 23, 2007 Author Share Posted August 23, 2007 why don't use oracle instance(oci) insted of odbc. couldn't get it to work. even examples out of the oracle/php underground book from Oracle. not a thing would work. the Administrators told me to use this. So any help at all on it or don't know? Quote Link to comment https://forums.phpfreaks.com/topic/65224-oracle-php-form/#findComment-331911 Share on other sites More sharing options...
Illusion Posted August 24, 2007 Share Posted August 24, 2007 what is the error u r getting? Quote Link to comment https://forums.phpfreaks.com/topic/65224-oracle-php-form/#findComment-332842 Share on other sites More sharing options...
wastedthelight Posted August 24, 2007 Author Share Posted August 24, 2007 what is the error u r getting? okay man sorry but if anyone else can help that would be great. you've told me to try and to paste the code and all and you haven't offered any form of help at all. I mean if you really know how to do what im trying to do and could help you could have looked at the code and seen what i'm doing wrong by now. sorry, not trying to be a jerk, just wanted some help and getting more aggravated then Oracle is already making me. Quote Link to comment https://forums.phpfreaks.com/topic/65224-oracle-php-form/#findComment-333180 Share on other sites More sharing options...
TheFilmGod Posted September 18, 2007 Share Posted September 18, 2007 what is the error u r getting? okay man sorry but if anyone else can help that would be great. you've told me to try and to paste the code and all and you haven't offered any form of help at all. I mean if you really know how to do what im trying to do and could help you could have looked at the code and seen what i'm doing wrong by now. sorry, not trying to be a jerk, just wanted some help and getting more aggravated then Oracle is already making me. Dude what is wrong with you? The guy is trying to help as best as he can! He gave you some suggestions and you choose not to follow them. No biggy. He looked at your code and he might not have found the error. So relax. Oh, and google is your friend. Don't expect him or me to do your homework for you! Quote Link to comment https://forums.phpfreaks.com/topic/65224-oracle-php-form/#findComment-350712 Share on other sites More sharing options...
0123456789 Posted October 9, 2007 Share Posted October 9, 2007 Al fin que encuentro ayuda !!!!!!1 Saben ya tengo listo para usar el oracle con el php, tengo el formulario de mostrar registros pero me hacen falta los siguientes formularios > 1. insertar 2. eliminar 3. buscar 4. modificar Si alguein sabe como va el codigo en cada formulario que sea amables en poner el codigo ....... //Me salen errores de codigo es por eso que les pido ayuda, les estare muy agradecido. please !!!!!!!! Quote Link to comment https://forums.phpfreaks.com/topic/65224-oracle-php-form/#findComment-365680 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.