Use OCI to input data to the data table 'email _ info'
Same as above, but it is written using OCI.
Related PHPCode:
If ($ submit = "click "){
// The submit button was clicked!
// Get the input for fullname and email then store it in the database.
Putenv ("oracle_sid = orasid ");
$ Connection = ocilogon ("username", "password ");
If ($ connection = false ){
Echo ocierror ($ connection )."
";
Exit;
}
$ Query = "insert into email_info values ('$ fullname',' $ email ')";
$ Cursor = ociparse ($ connection, $ query );
If ($ cursor = false ){
Echo ocierror ($ cursor )."
";
Exit;
}
$ Result = ociexecute ($ cursor );
If ($ result = false ){
Echo ocierror ($ cursor )."
";
Exit;
}
Ocicommit ($ connection );
Ocilogoff ($ connection );
}
Else {
Echo'
<Form action = insert. php method = post>
Enter name
<Input name = fullname> </input>
Enter the email address
<Input name = Email> </input>
<Input name = submit type = submit value = click> </input>
</Form>
';
}
?>
By the way, this script must be saved as insert. php, because insert. php is specified as form processing on the called page.Program