Jump to content


New Members
  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About NA05

  • Rank
  1. NA05

    login in php

    how i login in php through oracle database. please experts help me in login form php through oracle perfect code <?php $username = $_POST["username"]; $password = $_POST["password"]; $con = oci_connect("user","pswrd","db"); if(! $con) { die('Connection Failed'.oci_error()); } $query = "SELECT username, password FROM users WHERE username=$username"; $stmt = oci_parse($conn, $query); $row = oci_fetch_array($stmt, OCI_NUM);; if($row["username"]==$username && $row["password"]==$password) echo"You are a validated user."; else echo"Sorry, your credentials are not valid, Please try again."; ?> and my html code is here... <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>form</title> </head> <body> <form method="post" action="login.php" > <table border="1" > <tr> <td><label for="username">username</label></td> <td><input type="text" name="username" id="username"></td> </tr> <tr> <td><label for="password">Password</label></td> <td><input name="password" type="password" id="password"></input></td> </tr> <tr> <td><input type="submit" value="Submit"/> <td><input type="reset" value="Reset"/> </tr> </table> </form> </body> </html>
  • 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.