Jump to content

PHP button problem


Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.