Teach you to use Oracle Database in PHP (iv)
Use OCI to enter data into data table ' Email_info '
Ditto, just use OCI to write
Related PHP Code:
if ($submit = = "click") {
The Submit button was clicked!
Get the input for FullName and e-mail 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>
Please enter your name
<input name=fullname> </INPUT>
Please enter an email address
<input name=email> </INPUT>
<input name=submit type=submit value=click> </INPUT>
</FORM>
';
}
?>
Yes, this script must be saved as insert.php, because specifying insert.php as the form handler in the called page
The above describes the teaching you to use Oracle database four in PHP, including the aspects of the content, I hope to be interested in PHP tutorial friends helpful.