PHP Insert and select query from Oracle database

Here are some PHP Script lines through which oracle database deals. To select data  from oracle we have fetch query script in php
Select query in php that selects data from Oracle database.
 $query = “SELECT * from users WHERE EMAIL='”.$email.”‘ and PASSWORD='”.$password.”‘”;
    $result = oci_parse($conn, $query);
    oci_execute($result);

Insert PHP query that inserts data in oracle database table
$sql = “INSERT INTO users (NAME,EMAIL,PASSWORD) VALUES(‘$name’,’$email’,’$password’)”;
$stid = oci_parse($conn, $sql);
oci_execute($stid);
$_SESSION[‘message’] = “You have registered successfully.”;

Leave a Reply

Your email address will not be published. Required fields are marked *