austine_power007 Posted April 6, 2006 Share Posted April 6, 2006 Hi all this is my 1st post on this forum i found that this is a gr8 forum for newbies like me who wants to learn PHP. I am in a gr8 trouble plzz help me: i am doing my final yr project using PHP and ORACLE so i just made a test form to check that the form cam connect to the database or not and try to insert some data. but its works fine but when i put a button than the button is not working so how i can make it work plzz help me itss URGENT!!!!!!!!!here is the code:<?php $c=OCILogon("scott", "tiger", "tanvir"); if ( ! $c ) { echo "Unable to connect: " . var_dump( OCIError() ); die(); } if(isset($_POST['submit'])) { $name=$_POST['Name']; $id=$_POST['ID']; $s = OCIParse($c, "insert into test values ('$name', '$id')"); OCIExecute($s, OCI_DEFAULT); } else if($HTTP_POST_VARS['view']) { // Select Data... $s = OCIParse($c, "select * from test"); OCIExecute($s, OCI_DEFAULT); while (OCIFetch($s)) { echo "Name = " . ociresult($s, "NAME") . " , ID = " . ociresult($s, "ID") . "\n"; } } // Commit to save changes... OCICommit($c); // Logoff from Oracle... OCILogoff($c);?>WHY SUBMIT & VIEW BUTTON IS NOT WORKING ????? Link to comment https://forums.phpfreaks.com/topic/6711-php-button-problem/ Share on other sites More sharing options...
wildteen88 Posted April 6, 2006 Share Posted April 6, 2006 Did you say you had a form? If so where is the code for your form, the html not the PHP as your php code looks ok. All I want to see is how your submitting your form. Link to comment https://forums.phpfreaks.com/topic/6711-php-button-problem/#findComment-24400 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.